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

Virtual property calculation fails if referencedObjectFields contains only edge-internal fields

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      3
    • Sprint:
      2020.09 - IDM

      Description

      TemporalConstraintsPredicateFactory.java fails with JsonValueException during ListBasedRelationshipDerivedVirtualPropertyConstitution for virtual properties calculated from a singleton relationship when limiting fields in queryConfig.

      Attached is the entire managed.json schema, the guilty virtual property being effectiveManager.

      Unsure if it should just be documented to not add \"_\" fields to the referencedObjectFields or if is a legitimate bug.

      Example queryConfig when error occurs:

      "queryConfig" : {
                                  "referencedRelationshipFields" : [
                                      "manager"
                                  ],
                                  "referencedObjectFields" : [
                                      "_id"
                                  ]
                              },
      

      Error in console:

      Caused by: org.forgerock.json.JsonValueException: /_refResourceCollection: Expecting a value
      	at org.forgerock.json.JsonValue.required(JsonValue.java:1211)
      	at org.forgerock.openidm.relationship.TemporalConstraintsPredicateFactory.lambda$vertexPredicate$3(TemporalConstraintsPredicateFactory.java:95)
      	at java.base/java.util.function.Predicate.lambda$and$0(Predicate.java:69)
      	at org.forgerock.openidm.relationship.ListBasedRelationshipDerivedVirtualPropertyConstitution.processResponses(ListBasedRelationshipDerivedVirtualPropertyConstitution.java:460)
      	at org.forgerock.openidm.relationship.ListBasedRelationshipDerivedVirtualPropertyConstitution.lambda$dispatchReadOrQuery$4(ListBasedRelationshipDerivedVirtualPropertyConstitution.java:437)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:83)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:98)
      	at org.forgerock.openidm.relationship.ListBasedRelationshipDerivedVirtualPropertyConstitution.dispatchReadOrQuery(ListBasedRelationshipDerivedVirtualPropertyConstitution.java:430)
      	at org.forgerock.openidm.relationship.ListBasedRelationshipDerivedVirtualPropertyConstitution.processVirtualProperties(ListBasedRelationshipDerivedVirtualPropertyConstitution.java:272)
      	at org.forgerock.openidm.managed.ManagedObjectSet.update(ManagedObjectSet.java:735)
      	at org.forgerock.openidm.managed.ManagedObjectSet.patchResource(ManagedObjectSet.java:1450)
      	... 164 more

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dhogan Dirk Hogan
                Reporter:
                katie.gonzalez Katie Gonzalez
                QA Assignee:
                Katie Gonzalez
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: