{"action":"created","comment":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/comments/25671634","id":25671634,"diff_hunk":"@@ -0,0 +1,41 @@\n+<?php\n+\n+namespace FOS\\ElasticaBundle\\Doctrine\\PHPCR;\n+\n+use FOS\\ElasticaBundle\\Doctrine\\AbstractElasticaToModelTransformer;\n+\n+/**\n+ * Maps Elastica documents with Doctrine objects\n+ * This mapper assumes an exact match between\n+ * elastica documents ids and doctrine object ids\n+ */\n+class ElasticaToDocumentTransformer extends AbstractElasticaToModelTransformer\n+{\n+    /**\n+     * Fetch objects for theses identifier values\n+     *\n+     * @param array $identifierValues ids values\n+     * @param Boolean $hydrate whether or not to hydrate the objects, false returns arrays\n+     * @return array of objects or arrays\n+     */\n+    protected function findByIdentifiers(array $identifierValues, $hydrate)\n+    {\n+        // Special case where model is interface. But maybe remove because negative performance impact\n+        $reflectionClass = new \\ReflectionClass($this->objectClass);\n+        if ($reflectionClass->isInterface()) {\n+            return iterator_to_array(\n+                $this->registry\n+                    ->getManager()\n+                    ->findMany(null, $identifierValues)\n+            );\n+        }\n+\n+        // General case\n+        return iterator_to_array(\n+            $this->registry\n+                ->getManager()\n+                ->getRepository($this->objectClass)","path":"Doctrine/PHPCR/ElasticaToDocumentTransformer.php","position":37,"original_position":37,"commit_id":"f83aa6f9f666abb113c9411632320eab21451722","original_commit_id":"f83aa6f9f666abb113c9411632320eab21451722","user":{"login":"dbu","id":76576,"avatar_url":"https://avatars.githubusercontent.com/u/76576?v=3","gravatar_id":"","url":"https://api.github.com/users/dbu","html_url":"https://github.com/dbu","followers_url":"https://api.github.com/users/dbu/followers","following_url":"https://api.github.com/users/dbu/following{/other_user}","gists_url":"https://api.github.com/users/dbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbu/subscriptions","organizations_url":"https://api.github.com/users/dbu/orgs","repos_url":"https://api.github.com/users/dbu/repos","events_url":"https://api.github.com/users/dbu/events{/privacy}","received_events_url":"https://api.github.com/users/dbu/received_events","type":"User","site_admin":false},"body":"in terms of phpcr-odm, this means that objects of this class or extending classes will be found. which sounds like a good idea to me. (so just to make sure you are aware of that)","created_at":"2015-03-03T09:04:19Z","updated_at":"2015-03-03T09:04:19Z","html_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/805#discussion_r25671634","pull_request_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/805","_links":{"self":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/comments/25671634"},"html":{"href":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/805#discussion_r25671634"},"pull_request":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/805"}}},"pull_request":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/805","id":30271720,"html_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/805","diff_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/805.diff","patch_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/805.patch","issue_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/805","number":805,"state":"open","locked":false,"title":"[WIP] Adding PHPCR support","user":{"login":"webda2l","id":517753,"avatar_url":"https://avatars.githubusercontent.com/u/517753?v=3","gravatar_id":"","url":"https://api.github.com/users/webda2l","html_url":"https://github.com/webda2l","followers_url":"https://api.github.com/users/webda2l/followers","following_url":"https://api.github.com/users/webda2l/following{/other_user}","gists_url":"https://api.github.com/users/webda2l/gists{/gist_id}","starred_url":"https://api.github.com/users/webda2l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webda2l/subscriptions","organizations_url":"https://api.github.com/users/webda2l/orgs","repos_url":"https://api.github.com/users/webda2l/repos","events_url":"https://api.github.com/users/webda2l/events{/privacy}","received_events_url":"https://api.github.com/users/webda2l/received_events","type":"User","site_admin":false},"body":"Follow https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/739\r\n\r\nThere is still a problem with the logger to fix.","created_at":"2015-03-02T10:19:16Z","updated_at":"2015-03-03T09:04:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8d2523855e934caae2d3370f02968098290fa6e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/805/commits","review_comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/805/comments","review_comment_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/805/comments","statuses_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/statuses/f83aa6f9f666abb113c9411632320eab21451722","head":{"label":"20minutes:master","ref":"master","sha":"f83aa6f9f666abb113c9411632320eab21451722","user":{"login":"20minutes","id":650716,"avatar_url":"https://avatars.githubusercontent.com/u/650716?v=3","gravatar_id":"","url":"https://api.github.com/users/20minutes","html_url":"https://github.com/20minutes","followers_url":"https://api.github.com/users/20minutes/followers","following_url":"https://api.github.com/users/20minutes/following{/other_user}","gists_url":"https://api.github.com/users/20minutes/gists{/gist_id}","starred_url":"https://api.github.com/users/20minutes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/20minutes/subscriptions","organizations_url":"https://api.github.com/users/20minutes/orgs","repos_url":"https://api.github.com/users/20minutes/repos","events_url":"https://api.github.com/users/20minutes/events{/privacy}","received_events_url":"https://api.github.com/users/20minutes/received_events","type":"Organization","site_admin":false},"repo":{"id":31428861,"name":"FOSElasticaBundle","full_name":"20minutes/FOSElasticaBundle","owner":{"login":"20minutes","id":650716,"avatar_url":"https://avatars.githubusercontent.com/u/650716?v=3","gravatar_id":"","url":"https://api.github.com/users/20minutes","html_url":"https://github.com/20minutes","followers_url":"https://api.github.com/users/20minutes/followers","following_url":"https://api.github.com/users/20minutes/following{/other_user}","gists_url":"https://api.github.com/users/20minutes/gists{/gist_id}","starred_url":"https://api.github.com/users/20minutes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/20minutes/subscriptions","organizations_url":"https://api.github.com/users/20minutes/orgs","repos_url":"https://api.github.com/users/20minutes/repos","events_url":"https://api.github.com/users/20minutes/events{/privacy}","received_events_url":"https://api.github.com/users/20minutes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/20minutes/FOSElasticaBundle","description":"Elasticsearch PHP integration for your Symfony2 project using Elastica","fork":true,"url":"https://api.github.com/repos/20minutes/FOSElasticaBundle","forks_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/forks","keys_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/teams","hooks_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/hooks","issue_events_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/issues/events{/number}","events_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/events","assignees_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/assignees{/user}","branches_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/branches{/branch}","tags_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/tags","blobs_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/languages","stargazers_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/stargazers","contributors_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/contributors","subscribers_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/subscribers","subscription_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/subscription","commits_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/contents/{+path}","compare_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/merges","archive_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/downloads","issues_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/issues{/number}","pulls_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/labels{/name}","releases_url":"https://api.github.com/repos/20minutes/FOSElasticaBundle/releases{/id}","created_at":"2015-02-27T16:43:11Z","updated_at":"2015-03-02T10:16:17Z","pushed_at":"2015-03-02T10:16:17Z","git_url":"git://github.com/20minutes/FOSElasticaBundle.git","ssh_url":"git@github.com:20minutes/FOSElasticaBundle.git","clone_url":"https://github.com/20minutes/FOSElasticaBundle.git","svn_url":"https://github.com/20minutes/FOSElasticaBundle","homepage":"","size":1359,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"FriendsOfSymfony:master","ref":"master","sha":"3c87cc16c7dd9419b771e3a3678b86481ab3c2f0","user":{"login":"FriendsOfSymfony","id":529709,"avatar_url":"https://avatars.githubusercontent.com/u/529709?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfSymfony","html_url":"https://github.com/FriendsOfSymfony","followers_url":"https://api.github.com/users/FriendsOfSymfony/followers","following_url":"https://api.github.com/users/FriendsOfSymfony/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfSymfony/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfSymfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfSymfony/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfSymfony/orgs","repos_url":"https://api.github.com/users/FriendsOfSymfony/repos","events_url":"https://api.github.com/users/FriendsOfSymfony/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfSymfony/received_events","type":"Organization","site_admin":false},"repo":{"id":1588858,"name":"FOSElasticaBundle","full_name":"FriendsOfSymfony/FOSElasticaBundle","owner":{"login":"FriendsOfSymfony","id":529709,"avatar_url":"https://avatars.githubusercontent.com/u/529709?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfSymfony","html_url":"https://github.com/FriendsOfSymfony","followers_url":"https://api.github.com/users/FriendsOfSymfony/followers","following_url":"https://api.github.com/users/FriendsOfSymfony/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfSymfony/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfSymfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfSymfony/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfSymfony/orgs","repos_url":"https://api.github.com/users/FriendsOfSymfony/repos","events_url":"https://api.github.com/users/FriendsOfSymfony/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfSymfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle","description":"Elasticsearch PHP integration for your Symfony2 project using Elastica","fork":false,"url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle","forks_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/forks","keys_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/teams","hooks_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/hooks","issue_events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/events{/number}","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/events","assignees_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/assignees{/user}","branches_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/branches{/branch}","tags_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/tags","blobs_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/languages","stargazers_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/stargazers","contributors_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/contributors","subscribers_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/subscribers","subscription_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/subscription","commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/contents/{+path}","compare_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/merges","archive_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/downloads","issues_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues{/number}","pulls_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/labels{/name}","releases_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/releases{/id}","created_at":"2011-04-08T19:48:24Z","updated_at":"2015-03-02T20:46:59Z","pushed_at":"2015-02-18T10:38:09Z","git_url":"git://github.com/FriendsOfSymfony/FOSElasticaBundle.git","ssh_url":"git@github.com:FriendsOfSymfony/FOSElasticaBundle.git","clone_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle.git","svn_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle","homepage":"","size":3934,"stargazers_count":453,"watchers_count":453,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":280,"mirror_url":null,"open_issues_count":74,"forks":280,"open_issues":74,"watchers":453,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/805"},"html":{"href":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/pull/805"},"issue":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/805"},"comments":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/805/comments"},"review_comments":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/805/comments"},"review_comment":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/pulls/805/commits"},"statuses":{"href":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/statuses/f83aa6f9f666abb113c9411632320eab21451722"}}}}