-
Type:
Improvement
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 7.0.0
-
Fix Version/s: None
-
Component/s: Module - Relationships, Module - Repository JDBC
-
Labels:
-
Epic Link:
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.