Cayenne
  1. Cayenne
  2. CAY-523

Add support for Microsoft Access Adapter so as to support isGenerated

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Undefined future
    • Fix Version/s: Undefined future
    • Component/s: Core Library
    • Labels:
      None

      Description

      Microsoft Access sucks , hence it is often encountered in applications that are in great need of being rewritten from scratch.

      Having Cayenne support for Microsoft Access allows running the new improved Cayenne powered application alongside the sucky old .asp spagetti code.

      Referring to:

      http://www.objectstyle.org/confluence/display/CAY/Custom+DbAdapter

      I'm opening a new feature request which where I can place the results of my efforts to write a Microsoft Access adapter.

      1. msaccessadapter.txt
        13 kB
        Øyvind Harboe
      2. msaccess.zip
        4 kB
        Øyvind Harboe

        Activity

        Hide
        Øyvind Harboe added a comment -

        I've taken this for a quick spin and it seems to basically work, though it is not ready for prime time in the immediate future.

        Any comments on whether I'm on the right track here would be greatly appreciated.

        For now I'll be testing this inhouse while we're developing an application.

        I tried to create a patch, but I couldn't connect to the sourceforge CVS server, hence the .zip file:


        cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cayenne login
        Logging in to :pserver:anonymous@cvs.sourceforge.net:2401/cvsroot/cayenne
        CVS password:
        cvs [login aborted]: end of file from server (consult above messages if any)


        Basically issuing a "SELECT @ @IDENTITY" after inserting a record with a generated column will return the generated key. The limitation is that this can only work with a single generated column.

        Tore Halset gave me a few pointers to get as far as I did, including his results of some googling:

        http://forum.java.sun.com/thread.jspa?threadID=368826&messageID=1564332

        Show
        Øyvind Harboe added a comment - I've taken this for a quick spin and it seems to basically work, though it is not ready for prime time in the immediate future. Any comments on whether I'm on the right track here would be greatly appreciated. For now I'll be testing this inhouse while we're developing an application. I tried to create a patch, but I couldn't connect to the sourceforge CVS server, hence the .zip file: cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cayenne login Logging in to :pserver:anonymous@cvs.sourceforge.net:2401/cvsroot/cayenne CVS password: cvs [login aborted] : end of file from server (consult above messages if any) Basically issuing a "SELECT @ @IDENTITY" after inserting a record with a generated column will return the generated key. The limitation is that this can only work with a single generated column. Tore Halset gave me a few pointers to get as far as I did, including his results of some googling: http://forum.java.sun.com/thread.jspa?threadID=368826&messageID=1564332
        Hide
        Andrus Adamchik added a comment -

        I'll take a look, probably next week. Yes, anonymous cvs is broken for almost a month now and we won't be migrating the core to Apache until 1.2 goes final. So unfortunately this situation will be going on for a while.

        Show
        Andrus Adamchik added a comment - I'll take a look, probably next week. Yes, anonymous cvs is broken for almost a month now and we won't be migrating the core to Apache until 1.2 goes final. So unfortunately this situation will be going on for a while.
        Hide
        Øyvind Harboe added a comment -

        My Cayenne superpowers are not quite up to the task of providing a fully formed MSAccess adapter.

        I also see that Cayenne 1.2 is imminent so throwing half-baked adapters into SVN is probably not a bright idea either.

        On the other hand, I would like to get some help and input from other people out there who are cursed with the problem of making Cayenne based appliactions that have to be able to run alongside MSAccess applications.

        Here is the only idea that I can think of on the top of my mind:

        commit MSAccess adapter to SVN as is, but do not update AutoAdapter until such time that the new MSAccess adapter is deemed worthy by the community. Throw in a "MSAccess adapter is not baked yet, use at own risk and feel free to pitch in" note...

        Show
        Øyvind Harboe added a comment - My Cayenne superpowers are not quite up to the task of providing a fully formed MSAccess adapter. I also see that Cayenne 1.2 is imminent so throwing half-baked adapters into SVN is probably not a bright idea either. On the other hand, I would like to get some help and input from other people out there who are cursed with the problem of making Cayenne based appliactions that have to be able to run alongside MSAccess applications. Here is the only idea that I can think of on the top of my mind: commit MSAccess adapter to SVN as is, but do not update AutoAdapter until such time that the new MSAccess adapter is deemed worthy by the community. Throw in a "MSAccess adapter is not baked yet, use at own risk and feel free to pitch in" note...
        Hide
        Øyvind Harboe added a comment -

        This is current snapshot of my MSAccess adapter that I'm testing on the application we're porting from Access & .asp to Cayenne & Tapestry.

        Show
        Øyvind Harboe added a comment - This is current snapshot of my MSAccess adapter that I'm testing on the application we're porting from Access & .asp to Cayenne & Tapestry.
        Hide
        Øyvind Harboe added a comment -

        We've been using this adapter for a while now, and it seems to work fine. At least for development purposes and for running DataPort to convert to a more sensible database it should be fine for a lot of people. We may at some point have the resources to run it through the Cayenne JUnit tests, but not in the forseable future.

        What should happen from here?

        Try to fold it into Cayenne?

        Put it up on the Wiki?

        Nothing?

        Show
        Øyvind Harboe added a comment - We've been using this adapter for a while now, and it seems to work fine. At least for development purposes and for running DataPort to convert to a more sensible database it should be fine for a lot of people. We may at some point have the resources to run it through the Cayenne JUnit tests, but not in the forseable future. What should happen from here? Try to fold it into Cayenne? Put it up on the Wiki? Nothing?
        Hide
        Andrus Adamchik added a comment -

        "Try to fold it in Cayenne" is the answer - but somebody have to have resources to do that...

        Show
        Andrus Adamchik added a comment - "Try to fold it in Cayenne" is the answer - but somebody have to have resources to do that...

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Øyvind Harboe
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development