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

_refResourceRev missing from VertexEdge link expaned data.

    XMLWordPrintable

    Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not a defect
    • 7.0.0
    • 7.0.0
    • Module - Relationships

      Description

      The _refResourceRev field is missing from VertexEdge Responses.

      For example:
      Create a user that is assigned a role.
      Modify the user twice, note that the rev of the user is now 2.
      Modify the role once, note that the rev if the role is now 1.

      A query like the following should return a `_refResourceRev` field that holds the revision of the role object.

      http://localhost:8080/openidm/managed/user?_pageSize=1000&_fields=roles/*&_queryFilter=_id eq 'id1a' 
      {
          "result": [
              {
                  "_id": "id1a",
                  "_rev": "2",
                  "roles": [
                      {
                          "_ref": "managed/role/testrolea",
                          "_refResourceCollection": "managed/role",
                          "_refResourceId": "testrolea",
                          "_refProperties": {
                              "_id": "b9d3beb6-926b-4e27-b4eb-143499ec2690",
                              "_rev": "0",
                              "_grantType": "conditional"
                          },
                          "name": "testrolea",
                          "description": "testrole1",
                          "condition": "/userName sw \"user1\"",
                          "_id": "testrolea",
                          "_rev": "1",
                          "privileges": []
                      }
                  ]
              }
          ],
          "resultCount": 1,
          "pagedResultsCookie": null,
          "totalPagedResultsPolicy": "NONE",
          "totalPagedResults": -1,
          "remainingPagedResults": -1
      }
      

      (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.

      http://localhost:8080/openidm/managed/user/id1a/roles?_pageSize=1000&_fields=*&_queryFilter=true
      {
          "result": [
              {
                  "_id": "b9d3beb6-926b-4e27-b4eb-143499ec2690",
                  "_rev": "0",
                  "_refResourceCollection": "managed/role",
                  "_ref": "managed/role/testrolea",
                  "_refResourceId": "testrolea",
                  "_refResourceRev": "1",
                  "name": "testrolea",
                  "description": "testrole1",
                  "condition": "/userName sw \"user1\"",
                  "privileges": [],
                  "_refProperties": {
                      "_grantType": "conditional",
                      "_id": "b9d3beb6-926b-4e27-b4eb-143499ec2690",
                      "_rev": "0"
                  }
              }
          ],
          "resultCount": 1,
          "pagedResultsCookie": null,
          "totalPagedResultsPolicy": "NONE",
          "totalPagedResults": -1,
          "remainingPagedResults": -1
      }
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: