-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 7.0.0
-
Fix Version/s: None
-
Component/s: Module - Managed Objects, Module - Relationships
-
Labels:None
-
Environment:7.0.0-SNAPSHOT" (build: 20200611190430, revision: c2458b3)
Virtual properties calculation throws 500 error if "returnByDefault" is false on referenced relationship, and source object is updated via PATCH on a different property (e.g. 'description'):
[288] Jun 14, 2020 12:54:08.679 PM org.forgerock.openidm.servlet.internal.ResourceFilters$3 lambda$handleRequestWithLogging$8
WARNING: Resource exception: 500 Internal Server Error: "/_refResourceCollection: Expecting a value"
To reproduce, define a virtual property on managed/user, e.g.:
"effectiveMemberOf" : { "title" : "effectiveMemberOf", "type" : "array", "viewable" : true, "searchable" : false, "userEditable" : true, "items" : { "type" : "string" }, "description" : null, "isVirtual" : true, "returnByDefault" : false, "deleteQueryConfig" : false, "queryConfig" : { "referencedRelationshipFields" : [ "memberOf" ], "referencedObjectFields" : [ "_id" ] }
The referenced relationship should look like this:
"memberOf" : { "description" : null, "title" : "Memberof", "viewable" : true, "searchable" : false, "userEditable" : false, "policies" : [ ], "returnByDefault" : false, "minLength" : null, "pattern" : null, "notifySelf" : true, "type" : "array", "items" : { "type" : "relationship", "reverseRelationship" : true, "reversePropertyName" : "members", "validate" : false, "properties" : { "_ref" : { "type" : "string" }, "_refProperties" : { "type" : "object", "properties" : { "_id" : { "type" : "string", "required" : false, "propName" : "_id" } } } }, "resourceCollection" : [ { "path" : "managed/account", "label" : "Customer Account", "query" : { "queryFilter" : "true", "fields" : [ "name" ], "sortKeys" : [ ] }, "notify" : false } ] } }
Next, trigger a change of the managed user by updating an arbitrary, non-related attribute, e.g. description.
Result: Internal Server Error.
Now change 'returnByDefault' to 'true' on the memberOf property and repeat the update.
Result: Success.
- duplicates
-
OPENIDM-14831 Virtual property calculation fails if referencedObjectFields contains only edge-internal fields
-
- Closed
-