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
publicclassTestOrientClient {
publicstaticvoidmain(String[] args){
OrientDBorientDB = newOrientDB("remote:localhost/test", OrientDBConfig.defaultConfig());
try(ODatabaseSessiondb = 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();
}
}
}
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(ODatabaseSessiondb = 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();
}
The text was updated successfully, but these errors were encountered:
robinZhao
changed the title
create edge with same subquery between from and to use position params, result is unexpected
create edge with same subquery between from and to use position params, result is wrong
Mar 10, 2019
Thank you for reporting, it could be a problem with the query execution plan caching, I'm checking it now.
In the meantime, you can work-around it using named parameters
OrientDB Version: <3.0.17>
Java Version: <1.8.0_172>
OS: <windows 10>
Expected behavior
exist data in person class
result should be:
Actual behavior
this is a wrong result
I think this is due to command caching
Steps to reproduce
The text was updated successfully, but these errors were encountered: