cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <mgen...@masslight.net>
Subject Re: Build failed in Hudson: Cayenne-trunk » h2,JDK 1.5 (latest),Ubuntu #372
Date Tue, 05 Oct 2010 13:53:58 GMT
One issue it is failing with:

SEVERE: Error generating schema...
org.h2.jdbc.JdbcSQLException: Attempt to define a second primary key;
SQL statement:
CREATE TABLE GENERATED_COLUMN_COMP_KEY (AUTO_PK INTEGER NOT NULL,
GENERATED_COLUMN INTEGER NOT NULL AUTO_INCREMENT, NAME VARCHAR(100)
NULL, PROPAGATED_PK INTEGER NOT NULL, PRIMARY KEY (AUTO_PK,
GENERATED_COLUMN, PROPAGATED_PK)) [90017-64]


The test map has the following:


 <db-entity name="GENERATED_COLUMN_COMP_KEY">
         <db-attribute name="AUTO_PK" type="INTEGER"
isPrimaryKey="true" isMandatory="true"/>
         <db-attribute name="GENERATED_COLUMN" type="INTEGER"
isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
         <db-attribute name="NAME" type="VARCHAR" length="100"/>
         <db-attribute name="PROPAGATED_PK" type="INTEGER"
isPrimaryKey="true" isMandatory="true"/>
 </db-entity>

I'm guessing that H2 doesn't allow multiple/compound PKs if one of
them is autogenerated.  Thoughts?

Thanks,

mrg

Mime
View raw message