Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
"toDepPk" is a DbRelationship property that hints that Cayenne should take the value of the join on the source side and propagate it to the target side. It only applies to PK-to-PK relationships.
It is an artificial construct with nothing equivalent on the DB side, so it may be confusing as to what it means. Moreover it is limited to PK-PK relationships, meaning that we can't propagate values if the source is not a PK.
I suggest that we replace "toDepPk" with a complementary "fk" property that is both well-understood and equally applies to every relationship. "toDepPk" will be a special case of "fk=false" relationship. In most cases it can be auto-calculated (if one side is a PK, and another one is not), so hopefully it will not create extra mapping work.