{"action":"closed","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/2488","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/2488/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/2488/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/2488/events","html_url":"https://github.com/orientechnologies/orientdb/issues/2488","id":35879533,"number":2488,"title":"[rexster/gremlin] Can not query any vertices after addVertex()","user":{"login":"takaomag","id":234209,"avatar_url":"https://avatars.githubusercontent.com/u/234209?v=3","gravatar_id":"","url":"https://api.github.com/users/takaomag","html_url":"https://github.com/takaomag","followers_url":"https://api.github.com/users/takaomag/followers","following_url":"https://api.github.com/users/takaomag/following{/other_user}","gists_url":"https://api.github.com/users/takaomag/gists{/gist_id}","starred_url":"https://api.github.com/users/takaomag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takaomag/subscriptions","organizations_url":"https://api.github.com/users/takaomag/orgs","repos_url":"https://api.github.com/users/takaomag/repos","events_url":"https://api.github.com/users/takaomag/events{/privacy}","received_events_url":"https://api.github.com/users/takaomag/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/waiting%20reply","name":"waiting reply","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"luigidellaquila","id":459289,"avatar_url":"https://avatars.githubusercontent.com/u/459289?v=3","gravatar_id":"","url":"https://api.github.com/users/luigidellaquila","html_url":"https://github.com/luigidellaquila","followers_url":"https://api.github.com/users/luigidellaquila/followers","following_url":"https://api.github.com/users/luigidellaquila/following{/other_user}","gists_url":"https://api.github.com/users/luigidellaquila/gists{/gist_id}","starred_url":"https://api.github.com/users/luigidellaquila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luigidellaquila/subscriptions","organizations_url":"https://api.github.com/users/luigidellaquila/orgs","repos_url":"https://api.github.com/users/luigidellaquila/repos","events_url":"https://api.github.com/users/luigidellaquila/events{/privacy}","received_events_url":"https://api.github.com/users/luigidellaquila/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/17","html_url":"https://github.com/orientechnologies/orientdb/milestones/2.2","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/17/labels","id":613160,"number":17,"title":"2.2","description":"","creator":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"open_issues":238,"closed_issues":81,"state":"open","created_at":"2014-03-28T13:17:36Z","updated_at":"2015-10-07T11:42:44Z","due_on":"2015-10-06T22:00:00Z","closed_at":null},"comments":2,"created_at":"2014-06-17T11:22:20Z","updated_at":"2015-10-07T11:42:44Z","closed_at":"2015-10-07T11:42:44Z","body":"The original question can be found in this thread:\r\nhttps://groups.google.com/forum/#!topic/orient-database/6s2Rr5u3uiQ\r\n\r\n* Environment\r\nOrientDB: 1.7.3\r\nRexster: 2.5.0\r\n\r\n* Description\r\nUsing gremlin through Rexster console (i.e. Rexpro protocol),\r\n   1. Add one new vertex using \"graph.addVertex()\".\r\n   2. Then, query the other existing (not-changed) vertex than the new one, but null is returned.\r\n\r\n* Example\r\n```\r\nrexster[groovy]> g = rexster.getGraph('m_test0')\r\n==>orientgraph[remote:localhost/m_test0]\r\n\r\n## Successful query (User.uid == 1)\r\nrexster[groovy]> user_1 = g.query().labels('User').has('uid', 1).vertices().toList()[0]\r\n==>v(User)[#142:0]\r\n\r\n## Add one vertex (User.uid == 3)\r\nrexster[groovy]> new_user = g.addVertex('class:User', 'uid', 3, 'nickname', 'mago')\r\n==>v(User)[#140:-2]\r\n\r\n## Can not query the other vertex (User.uid == 1) than the new one. What's wrong ?\r\nrexster[groovy]> user_1_again = g.query().labels('User').has('uid', 1).vertices().toList()[0]\r\n==>null\r\n\r\n## Also, can not query the other existing vertex (User.uid == 2).\r\nrexster[groovy]> user_2 = g.query().labels('User').has('uid', 2).vertices().toList()[0]\r\n==>null\r\n\r\nrexster[groovy]> g.commit()\r\n==>null\r\n\r\n## Even after commit(), all query fails.\r\nrexster[groovy]> user_1_again = g.query().labels('User').has('uid', 1).vertices().toList()[0]\r\n==>null\r\n\r\nrexster[groovy]> user_3 = g.query().labels('User').has('uid', 1).vertices().toList()[0]\r\n==>null\r\n```\r\n\r\nEven if I use \"g.V('@class', 'User').has('uid', 1)\" instead of \"g.query().labels('User')\", same result."}}