Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2739

Mapping Proposal: replace "toDepPk" with "fk"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 5.0-M2
    • 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.

      Attachments

        Activity

          People

            ntimofeev Nikita Timofeev
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m