[OPENIDM-14511] _refResourceRev missing from VertexEdge link expaned data. Created: 20/Mar/20 Updated: 20/Mar/20 Resolved: 20/Mar/20
|Component/s:||Module - Relationships|
|Reporter:||jason vincent||Assignee:||Dirk Hogan|
|Resolution:||Not a defect||Votes:||0|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
The _refResourceRev field is missing from VertexEdge Responses.
A query like the following should return a `_refResourceRev` field that holds the revision of the role object.
(just FYI - `_refProperties/_rev` is the revision of the relationship, and not that of the referenced object).
Note that if a EdgeVertex request is made, the `_refResourceRev` field is properly returned.
|Comment by jason vincent [ 20/Mar/20 ]|
_refResourceRev was added to the response of the EdgeVertex responses because there was a conflict between returning the _id and _rev of the relationship and that of the referenced vertex object. When building the response, the JSON of the relationship is treated as primary content and then merged with the content of the referenced vertex, minus the _id and _rev. In the EdgeVertex responses, the _refResourceId and _refResourceRev hold the _id and_rev of the referenced vertex and thus leaves _id and _rev in the response to refer to the relationship object state. In the example note that the _id in the EdgeVertex response is the UUID belonging to the relationship object.
In the VertexEdge response, the referenced vertex JSON is considered the primary JSON and then the relationship content is merged with it. Thus the _id and _rev of this response belongs to the vertex. The _id and _rev of the relationship are provided in the _refProperties field.
There is therefore no need to add the _refResourceRev in the VertexEdge responses.
FYI - In EdgeVertex responses, the _refResourceRev is only returned if the referenced vertex of the relationship is link expanded.