我正在创建顶点并用边连接顶点。
例如,我在类95:0
中创建了一个顶点(book
),并将此顶点连接到类50:0
中的某个“用户”(user
)通过名为ownedByUser
的边进入user
类。有时,使用OrientJS手册中提到的事务构建器更新这些边和顶点:= transaction manual - orientjs
如果我在user
课程中查询上述内容,理想情况下我应该得到以下答案:
{
"@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"
}
其中"in_ownedByUser": [
"#277:28"
],
是书籍(95:0
)和用户(50:0
)之间边缘的边缘消除。
但有时查询会返回如下:
{
"@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"
}
请注意,键in_ownedByUser
直接包含文档,而不是边缘删除。 in_ownedByUser
内的这个文件也缺少一个摆脱。有谁告诉我这里发生了什么?这不会一直发生。我想知道在什么情况下边缘摆脱被这个有价值的文件所取代。