cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: CayenneModeler "To Dep PK" Checkbox problem
Date Sun, 18 Jun 2006 13:02:13 GMT
Hi Rashid,

(seems like you are not subscribed to the list, so you won't get  
responses, not cc'd to you directly)

Generally "to dep pk" is disabled if Cayenne thinks that the target  
and/or source columns of the relationships are not PK, so doublecheck  
that PK is checked on attributes on both ends.

Also there was a bug that I recently fixed [1] that may be related,  
so could you try the Modeler from the latest nightly build [2]. Let  
us know if any of that worked.



On Jun 18, 2006, at 2:11 PM, Rashid Khan wrote:

> Hello there,
> I am using Cayenne1.2RC1. I am facing problems with the  
> CayenneModeler "To
> Dep PK" checkbox.
> I have the following database set up:
> * User table
> * Group table
> * UserGroup table (join table: maps users to groups)
> From what I understand the way cayenne works, I have to check the  
> "To Dep
> PK" checkbox in the UserGroupArray relationship of the User db- 
> entity (and
> the same with the UserGroupArray relationship of the Group db-entity).
> However, the checkbox in the Modeler is disabled.
> When I manually edit the file to set the
> "toDependentPK=true" for the respective relationships, my  
> application works
> fine. But a problem occurs when I open the cayenne.xml file again  
> in the
> modeler.
> Initially, the "To Dep PK" checkbox shows checked as I specified  
> manually in
> the map.xml file. However, when I save the cayenne.xml file again, the
> "toDependentPK=true" gets erased from the map.xml file and, as a  
> result, I
> don't see the "To Dep PK" checkboxes checked anymore in the Modeler.
> Please tell me what is the workaround for this, as it is very  
> critical for
> me to set up the relationships correctly.
> Sincerely,
> Rashid Khan

View raw message