{"action":"created","comment":{"url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/comments/37504887","id":37504887,"diff_hunk":"@@ -117,10 +117,17 @@ private function getFixedQueryBuilder(QueryBuilder $queryBuilder)\n         }\n \n         $results    = $queryBuilderId->getQuery()->execute(array(), Query::HYDRATE_ARRAY);\n+        $platform   = $queryBuilderId->getEntityManager()->getConnection()->getDatabasePlatform();\n         $idxMatrix  = array();\n         foreach ($results as $id) {\n             foreach ($idNames as $idName) {\n-                $idxMatrix[$idName][] = $id[$idName];\n+                $phpValue = $id[$idName];\n+                // Convert ids to database value in case of custom type\n+                $fieldType = $metadata->getTypeOfField($idName);\n+                $type = \\Doctrine\\DBAL\\Types\\Type::getType($fieldType);","path":"Datagrid/ProxyQuery.php","position":null,"original_position":12,"commit_id":"48b4f343bd6eddb777c39168c5dad6a901fe8e0c","original_commit_id":"8f34fcb1b94cb57b941a90c2056b2a6c8aa6186f","user":{"login":"ju1ius","id":218404,"avatar_url":"https://avatars.githubusercontent.com/u/218404?v=3","gravatar_id":"","url":"https://api.github.com/users/ju1ius","html_url":"https://github.com/ju1ius","followers_url":"https://api.github.com/users/ju1ius/followers","following_url":"https://api.github.com/users/ju1ius/following{/other_user}","gists_url":"https://api.github.com/users/ju1ius/gists{/gist_id}","starred_url":"https://api.github.com/users/ju1ius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ju1ius/subscriptions","organizations_url":"https://api.github.com/users/ju1ius/orgs","repos_url":"https://api.github.com/users/ju1ius/repos","events_url":"https://api.github.com/users/ju1ius/events{/privacy}","received_events_url":"https://api.github.com/users/ju1ius/received_events","type":"User","site_admin":false},"body":":ok_hand:","created_at":"2015-08-20T08:14:25Z","updated_at":"2015-08-20T08:14:25Z","html_url":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/481#discussion_r37504887","pull_request_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/481","_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/comments/37504887"},"html":{"href":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/481#discussion_r37504887"},"pull_request":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/481"}}},"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/481","id":42901156,"html_url":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/481","diff_url":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/481.diff","patch_url":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/481.patch","issue_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/issues/481","number":481,"state":"open","locked":false,"title":"[ProxyQuery] Convert identifiers values to database value","user":{"login":"ju1ius","id":218404,"avatar_url":"https://avatars.githubusercontent.com/u/218404?v=3","gravatar_id":"","url":"https://api.github.com/users/ju1ius","html_url":"https://github.com/ju1ius","followers_url":"https://api.github.com/users/ju1ius/followers","following_url":"https://api.github.com/users/ju1ius/following{/other_user}","gists_url":"https://api.github.com/users/ju1ius/gists{/gist_id}","starred_url":"https://api.github.com/users/ju1ius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ju1ius/subscriptions","organizations_url":"https://api.github.com/users/ju1ius/orgs","repos_url":"https://api.github.com/users/ju1ius/repos","events_url":"https://api.github.com/users/ju1ius/events{/privacy}","received_events_url":"https://api.github.com/users/ju1ius/received_events","type":"User","site_admin":false},"body":"This allows using custom DBAL types as identifiers.\r\n\r\nFor example when using the [UuidBinaryType](https://github.com/ramsey/uuid-doctrine/blob/master/src/UuidBinaryType.php) from the `ramsey/uuid-doctrine` package:\r\n```php\r\nuse Ramsey\\Uuid\\Uuid;\r\n\r\nclass Example\r\n{\r\n    /**\r\n     * @var \\Ramsey\\Uuid\\Uuid\r\n     *\r\n     * @ORM\\Column(type=\"uuid_binary\")\r\n     * @ORM\\Id\r\n     */\r\n    private $id;\r\n\r\n    public function __construct()\r\n    {\r\n        $this->id = Uuid::uuid4();\r\n    }\r\n}\r\n```\r\n\r\nthe identifier cannot simply be cast to string, since the database requires it's binary representation.\r\nSo we must make sure we convert the identifiers to their database value.","created_at":"2015-08-20T07:55:54Z","updated_at":"2015-08-20T08:14:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"edcb375ced38dd195e36ea1eb18843ac26f498b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/481/commits","review_comments_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/481/comments","review_comment_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/issues/481/comments","statuses_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/statuses/48b4f343bd6eddb777c39168c5dad6a901fe8e0c","head":{"label":"ju1ius:proxyquery-fix","ref":"proxyquery-fix","sha":"48b4f343bd6eddb777c39168c5dad6a901fe8e0c","user":{"login":"ju1ius","id":218404,"avatar_url":"https://avatars.githubusercontent.com/u/218404?v=3","gravatar_id":"","url":"https://api.github.com/users/ju1ius","html_url":"https://github.com/ju1ius","followers_url":"https://api.github.com/users/ju1ius/followers","following_url":"https://api.github.com/users/ju1ius/following{/other_user}","gists_url":"https://api.github.com/users/ju1ius/gists{/gist_id}","starred_url":"https://api.github.com/users/ju1ius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ju1ius/subscriptions","organizations_url":"https://api.github.com/users/ju1ius/orgs","repos_url":"https://api.github.com/users/ju1ius/repos","events_url":"https://api.github.com/users/ju1ius/events{/privacy}","received_events_url":"https://api.github.com/users/ju1ius/received_events","type":"User","site_admin":false},"repo":{"id":22717938,"name":"SonataDoctrineORMAdminBundle","full_name":"ju1ius/SonataDoctrineORMAdminBundle","owner":{"login":"ju1ius","id":218404,"avatar_url":"https://avatars.githubusercontent.com/u/218404?v=3","gravatar_id":"","url":"https://api.github.com/users/ju1ius","html_url":"https://github.com/ju1ius","followers_url":"https://api.github.com/users/ju1ius/followers","following_url":"https://api.github.com/users/ju1ius/following{/other_user}","gists_url":"https://api.github.com/users/ju1ius/gists{/gist_id}","starred_url":"https://api.github.com/users/ju1ius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ju1ius/subscriptions","organizations_url":"https://api.github.com/users/ju1ius/orgs","repos_url":"https://api.github.com/users/ju1ius/repos","events_url":"https://api.github.com/users/ju1ius/events{/privacy}","received_events_url":"https://api.github.com/users/ju1ius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ju1ius/SonataDoctrineORMAdminBundle","description":"Integrates the Doctrine ORM Project into the AdminBundle","fork":true,"url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle","forks_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/forks","keys_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/teams","hooks_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/events","assignees_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/tags","blobs_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/languages","stargazers_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/subscription","commits_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/merges","archive_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/downloads","issues_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/ju1ius/SonataDoctrineORMAdminBundle/releases{/id}","created_at":"2014-08-07T10:50:17Z","updated_at":"2014-08-02T17:17:52Z","pushed_at":"2015-08-20T08:10:22Z","git_url":"git://github.com/ju1ius/SonataDoctrineORMAdminBundle.git","ssh_url":"git@github.com:ju1ius/SonataDoctrineORMAdminBundle.git","clone_url":"https://github.com/ju1ius/SonataDoctrineORMAdminBundle.git","svn_url":"https://github.com/ju1ius/SonataDoctrineORMAdminBundle","homepage":"http://sonata-project.org/bundles/doctrine-orm-admin","size":683,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sonata-project:master","ref":"master","sha":"a883b10c09d136de617c1e53c2782648909a8c06","user":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"repo":{"id":2687013,"name":"SonataDoctrineORMAdminBundle","full_name":"sonata-project/SonataDoctrineORMAdminBundle","owner":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle","description":"Integrates the Doctrine ORM Project into the AdminBundle","fork":false,"url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle","forks_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/forks","keys_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/teams","hooks_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/events","assignees_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/tags","blobs_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/languages","stargazers_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/subscription","commits_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/merges","archive_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/downloads","issues_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/releases{/id}","created_at":"2011-11-01T11:12:33Z","updated_at":"2015-08-13T18:23:00Z","pushed_at":"2015-08-20T08:10:23Z","git_url":"git://github.com/sonata-project/SonataDoctrineORMAdminBundle.git","ssh_url":"git@github.com:sonata-project/SonataDoctrineORMAdminBundle.git","clone_url":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle.git","svn_url":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle","homepage":"http://sonata-project.org/bundles/doctrine-orm-admin","size":2612,"stargazers_count":161,"watchers_count":161,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":230,"mirror_url":null,"open_issues_count":114,"forks":230,"open_issues":114,"watchers":161,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/481"},"html":{"href":"https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/481"},"issue":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/issues/481"},"comments":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/issues/481/comments"},"review_comments":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/481/comments"},"review_comment":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/pulls/481/commits"},"statuses":{"href":"https://api.github.com/repos/sonata-project/SonataDoctrineORMAdminBundle/statuses/48b4f343bd6eddb777c39168c5dad6a901fe8e0c"}}}}