-
-
Notifications
You must be signed in to change notification settings - Fork 874
Closed
Description
OrientDB Version: <3.0.17>
Java Version: <1.8.0_172>
OS: <windows 10>
Expected behavior
public class TestOrientClient {
public static void main(String[] args){
OrientDB orientDB = new OrientDB("remote:localhost/test", OrientDBConfig.defaultConfig());
try(ODatabaseSession db = orientDB.open("test","root","root");) {
// Enter your code here...
db.begin(OTransaction.TXTYPE.OPTIMISTIC);
db.command("create edge friends from (select from person where name=?) to (select from person where name=?)","tom","green");
db.commit();
}
}
}exist data in person class
+----+-----+------+-----+----+----+
|# |@RID |@CLASS|name |age |id |
+----+-----+------+-----+----+----+
|0 |#45:0|person|tom |16 |1 |
|1 |#46:0|person|green|16 |1 |
+----+-----+------+-----+----+----+
result should be:
+----+-----+-------+-----+-----+
|# |@RID |@CLASS |out |in |
+----+-----+-------+-----+-----+
|0 |#49:0|friends|#45:0|#46:0|
+----+-----+-------+-----+-----+
Actual behavior
+----+-----+-------+-----+-----+
|# |@RID |@CLASS |out |in |
+----+-----+-------+-----+-----+
|0 |#49:0|friends|#45:0|#45:0|
+----+-----+-------+-----+-----+
this is a wrong result
I think this is due to command caching
Steps to reproduce
orientdb {db=test}> create class person extends V;
orientdb {db=test}> create class friends extends E;
orientdb {db=test}> insert into person (name,age,id) values ('tom',16,1);
orientdb {db=test}> insert into person (name,age,id) values ('green',16,1);
try(ODatabaseSession db = orientDB.open("test","root","root");) {
// Enter your code here...
db.begin(OTransaction.TXTYPE.OPTIMISTIC);
db.command("create edge friends from (select from person where name=?) to (select from person where name=?)","tom","green");
db.commit();
}Metadata
Metadata
Assignees
Labels
buglegacy not used anymorelegacy not used anymore