We are using OrientJS transaction mechanism in our coding to create vertex and edge. Currently facing an issue while creating edges. Sometimes, when we create edge e1 of sampleEdge from V1 to V2 edge rid (in_sampleEdge on V2) is loaded as document:{@type:document,@version:0,out:#12:3,in:#45:6}
If we query on e1 of sampleEdge (i.e. #78:9) output is {@type:document,@version:1,out:#12:3,in:#45:6}. Please note the versions. Actual version is 1 but on V2's IN property it appears as document with version 0.
Please find the Query results. Here I am creating User verted, Project Vertex and creating edge ownedByUser.
1. select * from #278:56 (Query on Edge)
{"@type":"d","@rid":"#278:56","@version":1,"@class":"ownedByUser","out":"#96:54","in":"#45:34","@fieldTypes":"out=x,in=x"}
2. select out_ownedByUser from #96:54 (Query on Project)
{"@type":"d","@rid":"#-2:0","@version":0,"out_ownedByUser":["#278:56"],"@fieldTypes":"out_ownedByUser=g"}
3. select in_ownedByUser from #45:34 (Query of User)
{"@type":"d","@rid":"#-2:0","@version":0,"in_ownedByUser":[{"@type":"d","@version":0,"@class":"ownedByUser","out":"#96:54","in":"#45:34","@fieldTypes":"out=x,in=x"}]}
This looks like a major bug in OrientDb for me. Edge is created, out property of originating vertex is finely updated. But not the destination vertex.
Its in_edge property is stored as document rather @rid. I believe its because @rid is not available in its metadata.
Kindly help on this.