Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-15108

Relationship Derived Virtual Properties composed of just the _id field will not be persisted upon signal receipt

    Details

    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      2
    • Sprint:
      2020.09 - IDM

      Description

      In ManagedObjectSet#handleSignalVertexUpdateFromEdge, the old (read from repo) and new (read from managed and with relationship-derived-virtual-property processing applied) are compared, and if they are equal, the managed object signal recipient will not be persisted. The problem is that ResourceUtil#isEqual is used to perform the equality comparison, but this comparison utility will strip out _id and _rev fields prior to performing the comparison. This means that

      {} 

      is equal to

      {"_id" :"foo", "_rev":"bar"}
      

      Assume an effectiveManager relationship-derived virtual property with a referencedObjectFields specification of _id. When, for example, a managed/user/boss is created with a reports field pointing to a managed/user/dev. Upon signal receipt associated with this created edge, the old managed/user/dev effectiveManager field will be

      {}
      

      the new effectiveManager field will be

      {"_id" :"xxx", "_rev":"1"}
      

      but due to the semantics of ResourceUtil#isEqual, these two fields will compare as equal, and thus the managed/user/dev, with the new effectiveManager field, will not be persisted.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dhogan Dirk Hogan
                Reporter:
                dhogan Dirk Hogan
                QA Assignee:
                Chris Drake
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: