{"action":"created","comment":{"url":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/comments/41236647","id":41236647,"diff_hunk":"@@ -78,42 +79,70 @@ public function apply(ResourceInterface $resource, QueryBuilder $queryBuilder)\n             return;\n         }\n \n-        $metadata = $this->getClassMetadata($resource);\n-        $fieldNames = array_flip($metadata->getFieldNames());\n-\n         foreach ($this->extractProperties($request) as $property => $value) {\n-            if (null === $value || !$this->isPropertyEnabled($property)) {\n+            if (\n+                !$this->isPropertyEnabled($property)\n+                || !$this->isPropertyMapped($property, $resource, true)\n+                || null === $value\n+            ) {\n                 continue;\n             }\n \n-            if (isset($fieldNames[$property])) {\n+            $alias = 'o';\n+            $field = $property;\n+\n+            if ($this->isPropertyNested($property)) {\n+                $propertyParts = $this->splitPropertyParts($property);\n+\n+                $parentAlias = $alias;\n+\n+                foreach ($propertyParts['associations'] as $association) {\n+                    $alias = QueryUtils::generateJoinAlias($association);\n+                    $queryBuilder->join(sprintf('%s.%s', $parentAlias, $association), $alias);","path":"Doctrine/Orm/Filter/SearchFilter.php","position":36,"original_position":36,"commit_id":"9267cfae1ef478afac62706323b6411349dbf5dd","original_commit_id":"9267cfae1ef478afac62706323b6411349dbf5dd","user":{"login":"theofidry","id":5175937,"avatar_url":"https://avatars.githubusercontent.com/u/5175937?v=3","gravatar_id":"","url":"https://api.github.com/users/theofidry","html_url":"https://github.com/theofidry","followers_url":"https://api.github.com/users/theofidry/followers","following_url":"https://api.github.com/users/theofidry/following{/other_user}","gists_url":"https://api.github.com/users/theofidry/gists{/gist_id}","starred_url":"https://api.github.com/users/theofidry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theofidry/subscriptions","organizations_url":"https://api.github.com/users/theofidry/orgs","repos_url":"https://api.github.com/users/theofidry/repos","events_url":"https://api.github.com/users/theofidry/events{/privacy}","received_events_url":"https://api.github.com/users/theofidry/received_events","type":"User","site_admin":false},"body":"the join is done on a property basis it will throw an exception if the join is done two times","created_at":"2015-10-06T08:26:21Z","updated_at":"2015-10-06T08:26:21Z","html_url":"https://github.com/dunglas/DunglasApiBundle/pull/242#discussion_r41236647","pull_request_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/242","_links":{"self":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/comments/41236647"},"html":{"href":"https://github.com/dunglas/DunglasApiBundle/pull/242#discussion_r41236647"},"pull_request":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/242"}}},"pull_request":{"url":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/242","id":43278714,"html_url":"https://github.com/dunglas/DunglasApiBundle/pull/242","diff_url":"https://github.com/dunglas/DunglasApiBundle/pull/242.diff","patch_url":"https://github.com/dunglas/DunglasApiBundle/pull/242.patch","issue_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/242","number":242,"state":"open","locked":false,"title":"Doctrine filters: Allow nested properties (across relations)","user":{"login":"teohhanhui","id":548843,"avatar_url":"https://avatars.githubusercontent.com/u/548843?v=3","gravatar_id":"","url":"https://api.github.com/users/teohhanhui","html_url":"https://github.com/teohhanhui","followers_url":"https://api.github.com/users/teohhanhui/followers","following_url":"https://api.github.com/users/teohhanhui/following{/other_user}","gists_url":"https://api.github.com/users/teohhanhui/gists{/gist_id}","starred_url":"https://api.github.com/users/teohhanhui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teohhanhui/subscriptions","organizations_url":"https://api.github.com/users/teohhanhui/orgs","repos_url":"https://api.github.com/users/teohhanhui/repos","events_url":"https://api.github.com/users/teohhanhui/events{/privacy}","received_events_url":"https://api.github.com/users/teohhanhui/received_events","type":"User","site_admin":false},"body":"- [x] AbstractFilter\r\n- [x] SearchFilter\r\n- [x] DateFilter\r\n- [x] OrderFilter\r\n- [ ] Tests (help needed!)\r\n\r\nI'm targeting #83","created_at":"2015-08-25T12:20:38Z","updated_at":"2015-10-06T08:26:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"260ac29b4b48f090d267bf515f48a22c4a34fa11","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/242/commits","review_comments_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/242/comments","review_comment_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/242/comments","statuses_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/statuses/9267cfae1ef478afac62706323b6411349dbf5dd","head":{"label":"teohhanhui:filter_nested","ref":"filter_nested","sha":"9267cfae1ef478afac62706323b6411349dbf5dd","user":{"login":"teohhanhui","id":548843,"avatar_url":"https://avatars.githubusercontent.com/u/548843?v=3","gravatar_id":"","url":"https://api.github.com/users/teohhanhui","html_url":"https://github.com/teohhanhui","followers_url":"https://api.github.com/users/teohhanhui/followers","following_url":"https://api.github.com/users/teohhanhui/following{/other_user}","gists_url":"https://api.github.com/users/teohhanhui/gists{/gist_id}","starred_url":"https://api.github.com/users/teohhanhui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teohhanhui/subscriptions","organizations_url":"https://api.github.com/users/teohhanhui/orgs","repos_url":"https://api.github.com/users/teohhanhui/repos","events_url":"https://api.github.com/users/teohhanhui/events{/privacy}","received_events_url":"https://api.github.com/users/teohhanhui/received_events","type":"User","site_admin":false},"repo":{"id":40953877,"name":"DunglasApiBundle","full_name":"teohhanhui/DunglasApiBundle","owner":{"login":"teohhanhui","id":548843,"avatar_url":"https://avatars.githubusercontent.com/u/548843?v=3","gravatar_id":"","url":"https://api.github.com/users/teohhanhui","html_url":"https://github.com/teohhanhui","followers_url":"https://api.github.com/users/teohhanhui/followers","following_url":"https://api.github.com/users/teohhanhui/following{/other_user}","gists_url":"https://api.github.com/users/teohhanhui/gists{/gist_id}","starred_url":"https://api.github.com/users/teohhanhui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teohhanhui/subscriptions","organizations_url":"https://api.github.com/users/teohhanhui/orgs","repos_url":"https://api.github.com/users/teohhanhui/repos","events_url":"https://api.github.com/users/teohhanhui/events{/privacy}","received_events_url":"https://api.github.com/users/teohhanhui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/teohhanhui/DunglasApiBundle","description":"The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too","fork":true,"url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle","forks_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/forks","keys_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/teams","hooks_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/hooks","issue_events_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/issues/events{/number}","events_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/events","assignees_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/assignees{/user}","branches_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/branches{/branch}","tags_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/tags","blobs_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/languages","stargazers_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/stargazers","contributors_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/contributors","subscribers_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/subscribers","subscription_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/subscription","commits_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/contents/{+path}","compare_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/merges","archive_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/downloads","issues_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/issues{/number}","pulls_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/labels{/name}","releases_url":"https://api.github.com/repos/teohhanhui/DunglasApiBundle/releases{/id}","created_at":"2015-08-18T06:04:59Z","updated_at":"2015-08-18T06:05:00Z","pushed_at":"2015-10-06T04:36:00Z","git_url":"git://github.com/teohhanhui/DunglasApiBundle.git","ssh_url":"git@github.com:teohhanhui/DunglasApiBundle.git","clone_url":"https://github.com/teohhanhui/DunglasApiBundle.git","svn_url":"https://github.com/teohhanhui/DunglasApiBundle","homepage":"https://api-platform.com","size":1099,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dunglas:master","ref":"master","sha":"2f850afe3e131e3ada50604d6a927f2ceb36f17d","user":{"login":"dunglas","id":57224,"avatar_url":"https://avatars.githubusercontent.com/u/57224?v=3","gravatar_id":"","url":"https://api.github.com/users/dunglas","html_url":"https://github.com/dunglas","followers_url":"https://api.github.com/users/dunglas/followers","following_url":"https://api.github.com/users/dunglas/following{/other_user}","gists_url":"https://api.github.com/users/dunglas/gists{/gist_id}","starred_url":"https://api.github.com/users/dunglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dunglas/subscriptions","organizations_url":"https://api.github.com/users/dunglas/orgs","repos_url":"https://api.github.com/users/dunglas/repos","events_url":"https://api.github.com/users/dunglas/events{/privacy}","received_events_url":"https://api.github.com/users/dunglas/received_events","type":"User","site_admin":false},"repo":{"id":29501260,"name":"DunglasApiBundle","full_name":"dunglas/DunglasApiBundle","owner":{"login":"dunglas","id":57224,"avatar_url":"https://avatars.githubusercontent.com/u/57224?v=3","gravatar_id":"","url":"https://api.github.com/users/dunglas","html_url":"https://github.com/dunglas","followers_url":"https://api.github.com/users/dunglas/followers","following_url":"https://api.github.com/users/dunglas/following{/other_user}","gists_url":"https://api.github.com/users/dunglas/gists{/gist_id}","starred_url":"https://api.github.com/users/dunglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dunglas/subscriptions","organizations_url":"https://api.github.com/users/dunglas/orgs","repos_url":"https://api.github.com/users/dunglas/repos","events_url":"https://api.github.com/users/dunglas/events{/privacy}","received_events_url":"https://api.github.com/users/dunglas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dunglas/DunglasApiBundle","description":"The Hypermedia REST API component of API Platform: JSON-LD and Hydra support, works with Symfony too","fork":false,"url":"https://api.github.com/repos/dunglas/DunglasApiBundle","forks_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/forks","keys_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/teams","hooks_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/hooks","issue_events_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/events{/number}","events_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/events","assignees_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/assignees{/user}","branches_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/branches{/branch}","tags_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/tags","blobs_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/languages","stargazers_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/stargazers","contributors_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/contributors","subscribers_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/subscribers","subscription_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/subscription","commits_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/contents/{+path}","compare_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/merges","archive_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/downloads","issues_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues{/number}","pulls_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/labels{/name}","releases_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/releases{/id}","created_at":"2015-01-19T23:05:56Z","updated_at":"2015-10-02T12:50:09Z","pushed_at":"2015-10-06T04:36:00Z","git_url":"git://github.com/dunglas/DunglasApiBundle.git","ssh_url":"git@github.com:dunglas/DunglasApiBundle.git","clone_url":"https://github.com/dunglas/DunglasApiBundle.git","svn_url":"https://github.com/dunglas/DunglasApiBundle","homepage":"https://api-platform.com/doc/1.0/api-bundle/","size":3184,"stargazers_count":241,"watchers_count":241,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":67,"forks":50,"open_issues":67,"watchers":241,"default_branch":"1.0"}},"_links":{"self":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/242"},"html":{"href":"https://github.com/dunglas/DunglasApiBundle/pull/242"},"issue":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/242"},"comments":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/242/comments"},"review_comments":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/242/comments"},"review_comment":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/pulls/242/commits"},"statuses":{"href":"https://api.github.com/repos/dunglas/DunglasApiBundle/statuses/9267cfae1ef478afac62706323b6411349dbf5dd"}}}}