Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1507

State change detection for version incrementation (for optimistic locking) in combination with orphanRemoval

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.4, 2.4.7
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All

      Description

      As i understand the documentation correctly, orphanRemoval associations have the meaning of a "part of" relationship. In the example (http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-associations.html#orphan-removal) the adresses are part of the contact.

      In my opinion we should reason that the state of the adress consists of the states of all nested contacts. As a consequence we should flag the contact as "dirty" when the adresses change.

      This is relevant for optimistic locking scenarios or event handlers. In my application i tried to use optimistic locking for "contacts", which does not work if i don't change anything in the contact but only in the nested addresses.

        Issue Links

          Activity

          georgwaechter Georg Wächter created issue -
          georgwaechter Georg Wächter made changes -
          Field Original Value New Value
          Affects Version/s 2.1.4 [ 10165 ]
          Affects Version/s 2.1.3 [ 10164 ]
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          beberlei Benjamin Eberlei made changes -
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira [ 13212 ] jira-feedback [ 13992 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira-feedback [ 13992 ] jira-feedback2 [ 15856 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira-feedback2 [ 15856 ] jira-feedback3 [ 18112 ]
          dhager Darien Hager made changes -
          Affects Version/s 2.4.7 [ 10724 ]
          dhager Darien Hager made changes -
          Labels unitofwork versioned
          dhager Darien Hager made changes -
          Link This issue is referenced by DDC-2864 [ DDC-2864 ]
          dhager Darien Hager made changes -
          Link This issue is referenced by DDC-3640 [ DDC-3640 ]

            People

            • Assignee:
              beberlei Benjamin Eberlei
              Reporter:
              georgwaechter Georg Wächter
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: