cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: AUTO_PK_SUPPORT, mysql and join tables
Date Sun, 28 Mar 2010 14:36:09 GMT
Odd. Join table with its own (non-propagated) PK should work the same  
as any other table. Which vesrion of Cayenne is this and are you using  
flattened relationships across the join table?

Andrus

On Mar 28, 2010, at 9:43 AM, John Armstrong wrote:

> Hi all,
>  I am using mysql with all database generated pks and auto_increment.
>
>  This works fine for all tables except join tables. When accessing a  
> join
> table cayenne tries to access the AUTO_PK_TABLE rather then relying  
> on the
> auto_increment.
>
> My join tables are configured identically :
>
> <db-entity name="USERPROJECTS" catalog="pgi">
> <db-attribute name="CREATIONDATE" type="TIMESTAMP" length="19"/>
> <db-attribute name="ID" type="INTEGER" isPrimaryKey="true"
> isGenerated="true" isMandatory="true" length="10"/>
> <db-attribute name="PGUSER" type="INTEGER" length="10"/>
> <db-attribute name="PROJECT" type="INTEGER" length="10"/>
> </db-entity>
> <obj-entity name="Userprojects"  
> className="com.pgi.common.Userprojects"
> dbEntityName="USERPROJECTS">
> <obj-attribute name="creationdate" type="java.util.Date"
> db-attribute-path="CREATIONDATE"/>
> <obj-attribute name="id" type="java.lang.Integer" db-attribute- 
> path="ID"/>
> </obj-entity>
>
> Any ideas?
>
> John-


Mime
View raw message