I am creating vertices and connecting vertices with edges.
For example, I make a vertex (95:0
) in the class book
and connect this vertex to a certain "user" (50:0
) in the class user
via an edge called ownedByUser
going IN the user
class . Sometimes these edges and vertices are updated using the transaction builder mentioned in the OrientJS manual := transaction manual - orientjs
If I query the above in the user
class, I should ideally get the below response:
{
"@type": "d",
"@rid": "#50:0",
"@version": 76,
"@class": "User",
"in_ownedByUser": [
"#277:28"
],
"createdDate": "2017-03-21 10:55:20",
"isPicAvailable": false,
"email": "xyz@xyz.com",
"organization": "SOME_ORG",
"uname": "cool_user",
"confirm_password": "welcome",
"tnc": true,
"id": "50:0",
"activeFlag": true,
"@fieldTypes": "in_ownedByUser=g,createdDate=t"
}
where "in_ownedByUser": [ "#277:28" ],
is the edge rid of the edge between the book(95:0
) and the user (50:0
).
But sometimes the query returns as the below:
{
"@type": "d",
"@rid": "#50:0",
"@version": 31,
"@class": "User",
"createdDate": "2017-04-05 12:35:24",
"isPicAvailable": true,
"activeFlag": true,
"email": "xyz@xyz.com",
"organization": "SOME+ORG",
"uname": "cool_user",
"confirm_password": "welcome",
"tnc": true,
"in_ownedByUser": [
{
"@type": "d",
"@version": 0,
"@class": "ownedByUser",
"out": "#94:58",
"in": "#48:23",
"@fieldTypes": "out=x,in=x"
}
],
"id": "50:0",
"@fieldTypes": "in_ownedByUser=g,createdDate=t"
}
Notice that the key in_ownedByUser
has the document directly and not the edge rid. This document inside in_ownedByUser
is also missing an rid. an anyone tell me what is happening here? This doesn't happen all the time. I would like to know in what scenario does the edge rid get replaced with this document tppe of value.
via user1452759
No comments:
Post a Comment