Autogenerated keys issues

From: bobsponge (ruben.garci..ecnicasdeingenieria.com)
Date: Thu Jul 10 2008 - 09:37:23 EDT

  • Next message: Garcia Corral, Josep: "RE: Autogenerated keys issues"

    Hello,

    I'm using cayenne v2.0.4 with h2 as database engine. All table indexes are
    auto-generated with a auto_pk_support table. Table Indexes generation
    usually works but some times I get an error like this

    org.apache.cayenne.CayenneRuntimeException: [v.2.0.4 October 12 2007] Commit
    Exception, org.h2.jdbc.JdbcSQLException: Unique index or primary key
    violation: PRIMARY_KEY_36 ON PUBLIC.TABLETEST(ID) [23001-74]

    It seems the ID generation fails with no reason at all. I usually get this
    problem in the same table when several insertions are performed very
    quickly. All changes in the datacontext are committed every time a new
    object is created.

    ¿Is there any problem with h2 database and auto_pk_support?

    Thank you

    -- 
    View this message in context: http://www.nabble.com/Autogenerated-keys-issues-tp18382943p18382943.html
    Sent from the Cayenne - User mailing list archive at Nabble.com.
    



    This archive was generated by hypermail 2.0.0 : Thu Jul 10 2008 - 09:37:57 EDT