Hi Takao, Queries are not aware of transaction, so the can't see changes before transaction commits. But after commit everything should work, looks like a bug that nothing changed when you commit().
Could you create a bug report <https://github.com/orientechnologies/orientdb/issues/new> to check that? Best regards, Artem Orobets * Orient Technologiesthe Company behind OrientDB* 2014-06-17 10:46 GMT+03:00 Takao Magoori <[email protected]>: > Hi, > > When I uses gremlin through Rexster console (i.e, Rexpro), I can not query > any vertex after "g.addVertex()". > I may misunderstand somethig, can anyone help me ? > > > - OrientDB version: 1.7.3 > - Rexster version: 2.5.0 > > > rexster[groovy]> g = rexster.getGraph('m_test0') > ==>orientgraph[remote:localhost/m_test0] > > rexster[groovy]> user_1 = g.query().labels('User').has('uid', > 1).vertices().toList()[0] > ==>v(User)[#142:0] > > rexster[groovy]> new_user = g.addVertex('class:User', 'uid', 3, > 'nickname', 'mago') > ==>v(User)[#140:-2] > > ## Can not get a vertex after "g.addVertex()". What's wrong ? > rexster[groovy]> user_1_again = g.query().labels('User').has('uid', > 1).vertices().toList()[0] > ==>null > > ## Can not get an existing vertex. What's wrong ? > rexster[groovy]> user_2 = g.query().labels('User').has('uid', > 2).vertices().toList()[0] > ==>null > > rexster[groovy]> g.commit() > ==>null > > ## Even after commit(), nothing changed. > rexster[groovy]> user_1_again = g.query().labels('User').has('uid', > 1).vertices().toList()[0] > ==>null > > rexster[groovy]> user_3 = g.query().labels('User').has('uid', > 1).vertices().toList()[0] > ==>null > > > Even if I use "g.V('@class', 'User').has('uid', 1)" instead of > "g.query().labels('User')", same result. > > > -- > Takao Magoori > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
