You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (Jira)" <ji...@apache.org> on 2024/10/14 15:25:00 UTC

[jira] [Updated] (CAY-2739) Mapping Proposal: replace "toDepPk" with "fk"

     [ https://issues.apache.org/jira/browse/CAY-2739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikita Timofeev updated CAY-2739:
---------------------------------
    Fix Version/s: 5.0-M2

> Mapping Proposal:  replace "toDepPk" with "fk"
> ----------------------------------------------
>
>                 Key: CAY-2739
>                 URL: https://issues.apache.org/jira/browse/CAY-2739
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Andrus Adamchik
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 5.0-M2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> "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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)