Re: Sequoia, Cayenne, MySql 5 with AUTO_PK_SUPPORT

From: Tobias SCHOESSLER (Tobias.Schoessle..nvienna.org)
Date: Thu Aug 24 2006 - 11:45:18 EDT

  • Next message: Dan Morgan (JIRA): "[JIRA] Created: (CAY-635) Null pointer exception while importing EOModel"

    I want to try out the setup using mysql's AUTO_INCREMENT for PK
    Generation. As I understood from some posts this is supported in 1.2.

    In mysql I set the id columns to use AUTO_INCREMENT. Manual inserts work
    fine, I see incremented ids.

    In cayenne modeller I set PK Generation Strategy to Database-Generated and
    selected the respective Auto Increment Column.

    But at runtime I still see cayenne trying to call auto_pk_support. Did I
    miss something to setup?

    Tobias.

                                                                               
                 Andrus Adamchik
                 <andru..bjectsty
                 le.org> To
                                           cayenne-de..ncubator.apache.org
                 Friday, 18 August cc
                 2006 15:49
                                                                       Subject
                                           Re: Sequoia, Cayenne, MySql 5 with
                 Please respond to AUTO_PK_SUPPORT
                 cayenne-de..ncub
                  ator.apache.org
                                                                               
                                                                               
                                                                               
                                                                               

    Custom PkGenerator can be a solution now.

    Also we discussed an "optimistic" pk generator some time back:

    http://objectstyle.org/cayenne/lists/cayenne-user/2006/07/0067.html

    Andrus

    On Aug 18, 2006, at 5:24 AM, Tobias SCHOESSLER wrote:

    > I am trying to get Cayenne 1.2 work with Sequoia ( former CJDB
    > http://sequoia.continuent.org ) with MySql 5.
    >
    > Sequoia is implementing a clustered JDBC Driver which is
    > broadcasting all
    > JDBC traffic to a cluster of connected databases.
    >
    > We are using AUTO_PK_SUPPORT of cayenne because we like the database
    > independency of the solution and would like to keep using this in
    > this set
    > up.
    >
    > Unfortunately Sequoia seems to have problems with the
    >
    > LOCK TABLES AUTO_PK_SUPPORT WRITE
    >
    > commands Cayenne's MySql Adapter is firing when retrieving new IDs
    > from the
    > AUTO_PK_SUPPORT TABLE. I could not verify that this is a known
    > issue with
    > Sequoia and MySql yet.
    >
    > I wondered if there is a way around these LOCK TABLES - why is not a
    > transaction used to retrieve the IDs like in the Sybase adapter?
    >
    > Has someone experience with a similar set up?
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Aug 24 2006 - 11:45:50 EDT