{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4247","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4247/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4247/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4247/events","html_url":"https://github.com/orientechnologies/orientdb/issues/4247","id":82736634,"number":4247,"title":"Inconsistent query results depending on order of RIDs in array","user":{"login":"dcarr178","id":2379611,"avatar_url":"https://avatars.githubusercontent.com/u/2379611?v=3","gravatar_id":"","url":"https://api.github.com/users/dcarr178","html_url":"https://github.com/dcarr178","followers_url":"https://api.github.com/users/dcarr178/followers","following_url":"https://api.github.com/users/dcarr178/following{/other_user}","gists_url":"https://api.github.com/users/dcarr178/gists{/gist_id}","starred_url":"https://api.github.com/users/dcarr178/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcarr178/subscriptions","organizations_url":"https://api.github.com/users/dcarr178/orgs","repos_url":"https://api.github.com/users/dcarr178/repos","events_url":"https://api.github.com/users/dcarr178/events{/privacy}","received_events_url":"https://api.github.com/users/dcarr178/received_events","type":"User","site_admin":false},"labels":[],"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/60","html_url":"https://github.com/orientechnologies/orientdb/milestones/2.1.1","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/60/labels","id":1242057,"number":60,"title":"2.1.1","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":47,"closed_issues":24,"state":"open","created_at":"2015-08-05T13:34:08Z","updated_at":"2015-08-27T17:05:22Z","due_on":"2015-08-25T22:00:00Z","closed_at":null},"comments":15,"created_at":"2015-05-30T07:36:29Z","updated_at":"2015-08-27T17:05:22Z","closed_at":"2015-08-27T17:05:22Z","body":"I have encountered a bug both in orientdb-server v.2.0.5 and in v.2.0.10. It has to do with querying an edge depending on the order of vertices in an array. In the example below:\r\n\r\n- Query 1 is correct. Vertex has the specified edge.\r\n- Query 2 is correct. Vertex does not have an edge.\r\n- Query 3 is correct. When querying multiple vertices via an array one has an edge and the other doesn't so one shows null values and the other one has populated values.\r\n- Query 4 is wrong. The result set shows populated edges for both vertices even though one vertex has no edge! The only thing that changed in this query was the order of vertices in the array.\r\n\r\n```\r\nOrientDB console v.2.0.10 (build UNKNOWN@r${buildNumber}; 2015-03-12 22:59:10+0000) www.orientechnologies.com\r\nType 'help' to display all the supported commands.\r\nInstalling extensions for GREMLIN language v.2.6.0\r\n\r\norientdb {db=river}> select first(out('rProductChannelProduct')).SKU as SKU, first(out('rProductChannelProduct')).Brand as Brand, @rid from #19:244441\r\n\r\n----+------+----+----------+----------\r\n#   |@CLASS|SKU |Brand     |rid\r\n----+------+----+----------+----------\r\n0   |null  |1111|BodyGuardz|#19:244441\r\n----+------+----+----------+----------\r\n\r\n1 item(s) found. Query executed in 0.003 sec(s).\r\norientdb {db=river}> select first(out('rProductChannelProduct')).SKU as SKU, first(out('rProductChannelProduct')).Brand as Brand, @rid from #19:326589\r\n\r\n----+------+----------\r\n#   |@CLASS|rid\r\n----+------+----------\r\n0   |null  |#19:326589\r\n----+------+----------\r\n\r\n1 item(s) found. Query executed in 0.002 sec(s).\r\norientdb {db=river}> select first(out('rProductChannelProduct')).SKU as SKU, first(out('rProductChannelProduct')).Brand as Brand, @rid from [#19:326589, #19:244441]\r\n\r\n----+------+----------+----+----------\r\n#   |@CLASS|rid       |SKU |Brand\r\n----+------+----------+----+----------\r\n0   |null  |#19:326589|null|null\r\n1   |null  |#19:244441|1111|BodyGuardz\r\n----+------+----------+----+----------\r\n\r\n2 item(s) found. Query executed in 0.003 sec(s).\r\norientdb {db=river}> select first(out('rProductChannelProduct')).SKU as SKU, first(out('rProductChannelProduct')).Brand as Brand, @rid from [#19:244441, #19:326589]\r\n\r\n----+------+----+----------+----------\r\n#   |@CLASS|SKU |Brand     |rid\r\n----+------+----+----------+----------\r\n0   |null  |1111|BodyGuardz|#19:244441\r\n1   |null  |1111|BodyGuardz|#19:326589\r\n----+------+----+----------+----------\r\n\r\n2 item(s) found. Query executed in 0.002 sec(s).\r\norientdb {db=river}>\r\n```"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/135494184","html_url":"https://github.com/orientechnologies/orientdb/issues/4247#issuecomment-135494184","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4247","id":135494184,"user":{"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},"created_at":"2015-08-27T17:05:22Z","updated_at":"2015-08-27T17:05:22Z","body":"Thanks, fixed."}}