Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1751

Updating reference with already assigned node brings referential integrity exceptions

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.0.Final
    • Fix Version/s: 3.1.0.Final
    • Component/s: None
    • Labels:
      None

      Description

      1. Create node, assing to its (hard) reference property other node.
      2. Save node
      3. Assign again same node to the same property.
      4. Execute update and save
      5. Execute remove - leads to - referential integrity exception

      When nodes reference property is set to the same value during update operation, in SessionNode class, removeStrongReferrer is executed, it add key to removedStrong; then addStrongReferrer is executed, it adds key to addedStrong and removes from removedStrong value added before (by removeStrongReferrer).
      But in reality state has not changed, but still operations result: addedStrong contains new value.

      So it seems that node probably might then contain two references to the same object (one invalid). So during delete (of that referenced value) it fails due to that second existing somewhere reference (first is removed with referrer) which is invalid and 'floats' somewhere in the system?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                mmatloka Michal Matloka
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: