You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version number in referenced Vertex is incremented, so ODB is clearly updating it, but why? This is repeatable and the modified Vertex is always the one referenced in the new Vertex.
Notes on schema:
Children is an LINKMAP of VData
Samples is an EMBEDDEDMAP of VSample
Runninng Mode: Embedded, using PLOCAL access mode; running SQL from Studio
OrientDB Version: v2.2.0 on Linux (CentOS)
Java Version:
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
The text was updated successfully, but these errors were encountered:
PS - I verified that this issue affects any/all properties in the referenced Vertex. If any properties exist, they will be removed upon creating the new Vertex with the reference. But if the referenced Vertex does not contain any properties (i.e. the "empty" state it's left in after the create), then it is apparently untouched, as evidenced by the version number not being updated.
PPS - I tried one more test: If I create the new Vertex first, without including the Children property, and then later update the new Vertex and update the Children property (using PUT), it adds the reference without affecting the referenced Vertex. So the issue appears to only happen if the reference is included in the initial create operation.
One more test that I thought of: If I do the same operation in a custom function (below), it works just fine (and no difference between 'create vertex' and 'insert into').
begin;
let r1 = insert into VData set Notes = 'R1', Samples = {"01":{"@type":"d", "@class":"VSample", "Count": 1, "Scale": 0, "Sum16": 111}};
let r2 = insert into VData set Notes = 'R2', Samples = {"02":{"@type":"d", "@class":"VSample", "Count": 1, "Scale": 0, "Sum16": 222}}, Children = {"01": $r1};
commit;
Expected new Vertex to be created without modifying existing Vertex.
State before 'create vertex' (notice data in #23:1 Samples EMBEDDEDMAP property):
Command executed:
create vertex VData content {"Children": {"234": {"@type":"d", "@class":"VData", "@rid": "#23:1"}}}
State after 'create vertex' (notice incremented version and missing data in #23:1 Samples property):
Version number in referenced Vertex is incremented, so ODB is clearly updating it, but why? This is repeatable and the modified Vertex is always the one referenced in the new Vertex.
Notes on schema:
Runninng Mode: Embedded, using PLOCAL access mode; running SQL from Studio
OrientDB Version: v2.2.0 on Linux (CentOS)
Java Version:
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
The text was updated successfully, but these errors were encountered: