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

Relationships to unknown object types will return null expanded records.

    Details

      Description

      If any object has a relationship for which the referenced resource collection is not stored in our repo, that field will return null link expanded data.  It is expected that it should at least return the relationship _ref data, and allow the augmentation read to attempt a read to find the expanded data.

      For example:

      A device has a relationship called 'owner'.  A relationship is created between the device such that the owner is "system/ldap/user/boss1".

      If a read is called without fill link expansion: 

      GET: `managed/device/device123?_fields=owner` 

      returns, as expected:

      {
          "_id" : "device123",
          "_rev" : "0",
          "owner" : {
              "_ref" : "system/ldap/user/boss1",
              "_refResourceCollection" : "system/ldap/user",
              "_refResourceId" : "boss1",
              "_refProperties" : {
                  "_id" : "1000017",
                  "_rev" : "0"
              }
          }
      }

      However, if you do

      GET: `managed/device/device123?_fields=owner/*`

      it returns:

      {
          "_id" : "usbdeviceSystemOwner",
          "_rev" : "0",
          "owner" : null
      } 

       

      Expected is that the same relationship _ref data is returned, and possibly if an augment read is successful, then see the populated augment data. 

       

        Attachments

          Activity

            People

            • Assignee:
              dhogan Dirk Hogan
              Reporter:
              jason.vincent jason vincent
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: