cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: To dep PK
Date Tue, 02 Oct 2007 22:49:36 GMT

On 03/10/2007, at 7:32 AM, pinkybum_nabble wrote:

> I get an exception which indicates that the database tried to create a
> Dependent entry with a duplicate primary key. The only  
> configuration which
> alleviates this problem and creates unique Dependent keys is  
> checking the
> "To dep PK" checkbox on the dependent side of the relationship.

This should not be ticked in ordinary use. It is for special cases  
such as a one-to-one relationship model.

http://cayenne.apache.org/doc/to-dep-pk-checkbox.html

I'd be looking at your primary key generation strategy. Are you using  
the default? What key is being created in the database once you add  
and commit one record?


Ari Maniatis



-------------------------->
Aristedes Maniatis
phone +61 2 9660 9700
PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8



Mime
View raw message