Hi Dave,
Dave Paules writes:
> Hello Andrus,
>
> Well, I am not certain what "PK-> dep. PK" means. When I used EOModeler the
> meaning of "Dependent Primary Key" could mean different things depending on
> what you were talking about. Usually it meant that if I added a new Employee
> object and a new RetirementAccount object, the primary key value for the
> Employee tuple would ALSO be the primary key value for the RetirementAccount
> tuple.
Yes this is what it means in Cayenne too. Kind of "master-detail"
relationships. But as you described below, this is not the case in your
schema.
> 1. What does "To Dep PK" mean in Cayenne Modeler? With regard to your
> suggestion of setting that checkbox on the db relationship from Employee to
> RetirementAccount, the modeler will not allow me to check it. When I do
> check it by setting the xml text to true, the run-time tells me that "the
> toDependentPK value is incorrectly set to true, unsetting it".
Sure. This checkbox shoudn't be checked, since my original guess about your
schema was incorrect. But from the database persoective a relationship from
Employee to RetirementAccount is "to-many", since RetirementAccount has a
Foreign Key to Employee. So this should be modeled as "to-many". I am almost
sure that it was mapping it as "to one" that caused the error.
I need to think some more how to handle this issue more gracefully in the
future, for now I suggest changing Employee->Account to be "to many".
Hope this helps.
Andrus
This archive was generated by hypermail 2.0.0 : Fri Jan 03 2003 - 13:40:45 EST