{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/7247","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/7247/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/7247/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/7247/events","html_url":"https://github.com/orientechnologies/orientdb/issues/7247","id":215116450,"number":7247,"title":"Incorrect SQL Result when using SELECT IN","user":{"login":"vsspt","id":9887811,"avatar_url":"https://avatars2.githubusercontent.com/u/9887811?v=3","gravatar_id":"","url":"https://api.github.com/users/vsspt","html_url":"https://github.com/vsspt","followers_url":"https://api.github.com/users/vsspt/followers","following_url":"https://api.github.com/users/vsspt/following{/other_user}","gists_url":"https://api.github.com/users/vsspt/gists{/gist_id}","starred_url":"https://api.github.com/users/vsspt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsspt/subscriptions","organizations_url":"https://api.github.com/users/vsspt/orgs","repos_url":"https://api.github.com/users/vsspt/repos","events_url":"https://api.github.com/users/vsspt/events{/privacy}","received_events_url":"https://api.github.com/users/vsspt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-17T20:40:07Z","updated_at":"2017-03-27T08:09:48Z","closed_at":null,"body":"## OrientDB Version, operating system, or hardware.\r\nv2.2.17\r\n\r\n## Operating System\r\n- [x ] Windows 8\r\n\r\n## JVM\r\n- 1.8.0_101-b13\r\n\r\n## Frameworks/Libs\r\n- Spring Boot 1.5.2 \r\n\r\n## Expected behavior and actual behavior\r\nWhen executing a SELECT IN Query, the fields are mapped incorrectly.\r\n\r\n## Steps to reproduce the problem\r\n\r\nPlease download this test project here: https://meocloud.pt/link/1086b248-ce9f-4305-abad-6ab99d01525a/2-2-17-Bug-2.zip/\r\n\r\nIn order to use the project, you will need to change the plocal url in the file: srt\\test\\testContext.xml.\r\n\r\nBasically, this is a simple Spring application that executes a simple Count Query:\r\n\r\n```\r\n\tprivate final String dmlSelect = \"SELECT * FROM TABLE_CONFIG WHERE RETRIES < 5 AND CONFIG_KEY IN (SELECT CONFIG_KEY FROM TEST_TABLE WHERE STATUS = 0)\";\t\r\n\r\n\tpublic List<Map<String, Object>> select() {\r\n\t\treturn getJdbcTemplate().queryForList(dmlSelect);\r\n\t}\r\n```\r\n\r\nThe Database has the following tables:\r\n\r\n**TABLE_CONFIG** \r\n_CONFIG_KEY| CONFIG_VALUE | RETRIES | FIELD_1 | FIELD_2_\r\n1                    | AAAA                 | 2            | 1           | 2\r\n2                    | BBBB                   | 6            | 1           | 2\r\n\r\n**TEST_TABLE ** \r\n_CONFIG_KEY| STATUS\r\n1                    |  0\r\n2                    |  1\r\n\r\n\r\n- When executing from the **Java Code**, the result of the Query **is mapped incorrectly**: [{CONFIG_KEY=1, **RETRIES=AAAA, CONFIG_VALUE=2**, FIELD_1=1, FIELD_2=2}]\r\n\r\n- When executing from **OrientDB console**, the result is is **mapped correctly**: [{CONFIG_KEY=1, **RETRIES=2, CONFIG_VALUE=AAAA**, FIELD_1=1, FIELD_2=2}]\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/289382968","html_url":"https://github.com/orientechnologies/orientdb/issues/7247#issuecomment-289382968","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/7247","id":289382968,"user":{"login":"luigidellaquila","id":459289,"avatar_url":"https://avatars3.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},"created_at":"2017-03-27T08:09:48Z","updated_at":"2017-03-27T08:09:48Z","body":"Hi @vsspt \r\n\r\nI think I got the problem, probably the JDBC driver is not mapping correctly the columns to the property names. Let me assign it to @robfrank for a check\r\n\r\nThanks\r\n\r\nLuigi"}}
{"actor":{"display_login":"luigidellaquila"}}