{"action":"created","comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments/24824610","id":24824610,"diff_hunk":"@@ -1926,13 +1926,21 @@ public function many_many_extraFields($component = null) {\n \t\t\t\t$manyMany = $SNG_class->stat('belongs_many_many');\n \t\t\t\t$candidate = (isset($manyMany[$component])) ? $manyMany[$component] : null;\n \t\t\t\tif($candidate) {\n+\t\t\t\t\t$relationName = null;\n+\t\t\t\t\t// Extract class and relation name from dot-notation\n+\t\t\t\t\tif(strpos($candidate, '.') !== false) {\n+\t\t\t\t\t\tlist($candidate, $relationName) = explode('.', $candidate);","path":"model/DataObject.php","position":7,"original_position":7,"commit_id":"9c73e97d858c98064f9521dd0307b60430982d1a","original_commit_id":"9c73e97d858c98064f9521dd0307b60430982d1a","user":{"login":"dhensby","id":563596,"avatar_url":"https://avatars.githubusercontent.com/u/563596?v=3","gravatar_id":"","url":"https://api.github.com/users/dhensby","html_url":"https://github.com/dhensby","followers_url":"https://api.github.com/users/dhensby/followers","following_url":"https://api.github.com/users/dhensby/following{/other_user}","gists_url":"https://api.github.com/users/dhensby/gists{/gist_id}","starred_url":"https://api.github.com/users/dhensby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhensby/subscriptions","organizations_url":"https://api.github.com/users/dhensby/orgs","repos_url":"https://api.github.com/users/dhensby/repos","events_url":"https://api.github.com/users/dhensby/events{/privacy}","received_events_url":"https://api.github.com/users/dhensby/received_events","type":"User","site_admin":false},"body":"You need to explicitly set the 3rd argument of explode to be `2` as you're using list.\r\n\r\n```php\r\nexplode('.', $candidate, 2);\r\n```","created_at":"2015-02-17T15:46:28Z","updated_at":"2015-02-17T15:46:28Z","html_url":"https://github.com/silverstripe/silverstripe-framework/pull/3799#discussion_r24824610","pull_request_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/3799","_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments/24824610"},"html":{"href":"https://github.com/silverstripe/silverstripe-framework/pull/3799#discussion_r24824610"},"pull_request":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/3799"}}},"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/3799","id":27571275,"html_url":"https://github.com/silverstripe/silverstripe-framework/pull/3799","diff_url":"https://github.com/silverstripe/silverstripe-framework/pull/3799.diff","patch_url":"https://github.com/silverstripe/silverstripe-framework/pull/3799.patch","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3799","number":3799,"state":"open","locked":false,"title":"NEW: Support multiple many_manys between the same classes (closes #1377)","user":{"login":"kinglozzer","id":1655548,"avatar_url":"https://avatars.githubusercontent.com/u/1655548?v=3","gravatar_id":"","url":"https://api.github.com/users/kinglozzer","html_url":"https://github.com/kinglozzer","followers_url":"https://api.github.com/users/kinglozzer/followers","following_url":"https://api.github.com/users/kinglozzer/following{/other_user}","gists_url":"https://api.github.com/users/kinglozzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kinglozzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinglozzer/subscriptions","organizations_url":"https://api.github.com/users/kinglozzer/orgs","repos_url":"https://api.github.com/users/kinglozzer/repos","events_url":"https://api.github.com/users/kinglozzer/events{/privacy}","received_events_url":"https://api.github.com/users/kinglozzer/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-18T13:30:40Z","updated_at":"2015-02-17T15:46:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"935a67469afc10db723a1ee3767716b392d3796d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/3799/commits","review_comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/3799/comments","review_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments/{number}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3799/comments","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/9c73e97d858c98064f9521dd0307b60430982d1a","head":{"label":"kinglozzer:1377-multiple-many-many","ref":"1377-multiple-many-many","sha":"9c73e97d858c98064f9521dd0307b60430982d1a","user":{"login":"kinglozzer","id":1655548,"avatar_url":"https://avatars.githubusercontent.com/u/1655548?v=3","gravatar_id":"","url":"https://api.github.com/users/kinglozzer","html_url":"https://github.com/kinglozzer","followers_url":"https://api.github.com/users/kinglozzer/followers","following_url":"https://api.github.com/users/kinglozzer/following{/other_user}","gists_url":"https://api.github.com/users/kinglozzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kinglozzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinglozzer/subscriptions","organizations_url":"https://api.github.com/users/kinglozzer/orgs","repos_url":"https://api.github.com/users/kinglozzer/repos","events_url":"https://api.github.com/users/kinglozzer/events{/privacy}","received_events_url":"https://api.github.com/users/kinglozzer/received_events","type":"User","site_admin":false},"repo":{"id":6370354,"name":"sapphire","full_name":"kinglozzer/sapphire","owner":{"login":"kinglozzer","id":1655548,"avatar_url":"https://avatars.githubusercontent.com/u/1655548?v=3","gravatar_id":"","url":"https://api.github.com/users/kinglozzer","html_url":"https://github.com/kinglozzer","followers_url":"https://api.github.com/users/kinglozzer/followers","following_url":"https://api.github.com/users/kinglozzer/following{/other_user}","gists_url":"https://api.github.com/users/kinglozzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kinglozzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinglozzer/subscriptions","organizations_url":"https://api.github.com/users/kinglozzer/orgs","repos_url":"https://api.github.com/users/kinglozzer/repos","events_url":"https://api.github.com/users/kinglozzer/events{/privacy}","received_events_url":"https://api.github.com/users/kinglozzer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kinglozzer/sapphire","description":"SilverStripe's Sapphire Framework","fork":true,"url":"https://api.github.com/repos/kinglozzer/sapphire","forks_url":"https://api.github.com/repos/kinglozzer/sapphire/forks","keys_url":"https://api.github.com/repos/kinglozzer/sapphire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kinglozzer/sapphire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kinglozzer/sapphire/teams","hooks_url":"https://api.github.com/repos/kinglozzer/sapphire/hooks","issue_events_url":"https://api.github.com/repos/kinglozzer/sapphire/issues/events{/number}","events_url":"https://api.github.com/repos/kinglozzer/sapphire/events","assignees_url":"https://api.github.com/repos/kinglozzer/sapphire/assignees{/user}","branches_url":"https://api.github.com/repos/kinglozzer/sapphire/branches{/branch}","tags_url":"https://api.github.com/repos/kinglozzer/sapphire/tags","blobs_url":"https://api.github.com/repos/kinglozzer/sapphire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kinglozzer/sapphire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kinglozzer/sapphire/git/refs{/sha}","trees_url":"https://api.github.com/repos/kinglozzer/sapphire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kinglozzer/sapphire/statuses/{sha}","languages_url":"https://api.github.com/repos/kinglozzer/sapphire/languages","stargazers_url":"https://api.github.com/repos/kinglozzer/sapphire/stargazers","contributors_url":"https://api.github.com/repos/kinglozzer/sapphire/contributors","subscribers_url":"https://api.github.com/repos/kinglozzer/sapphire/subscribers","subscription_url":"https://api.github.com/repos/kinglozzer/sapphire/subscription","commits_url":"https://api.github.com/repos/kinglozzer/sapphire/commits{/sha}","git_commits_url":"https://api.github.com/repos/kinglozzer/sapphire/git/commits{/sha}","comments_url":"https://api.github.com/repos/kinglozzer/sapphire/comments{/number}","issue_comment_url":"https://api.github.com/repos/kinglozzer/sapphire/issues/comments/{number}","contents_url":"https://api.github.com/repos/kinglozzer/sapphire/contents/{+path}","compare_url":"https://api.github.com/repos/kinglozzer/sapphire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kinglozzer/sapphire/merges","archive_url":"https://api.github.com/repos/kinglozzer/sapphire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kinglozzer/sapphire/downloads","issues_url":"https://api.github.com/repos/kinglozzer/sapphire/issues{/number}","pulls_url":"https://api.github.com/repos/kinglozzer/sapphire/pulls{/number}","milestones_url":"https://api.github.com/repos/kinglozzer/sapphire/milestones{/number}","notifications_url":"https://api.github.com/repos/kinglozzer/sapphire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kinglozzer/sapphire/labels{/name}","releases_url":"https://api.github.com/repos/kinglozzer/sapphire/releases{/id}","created_at":"2012-10-24T13:30:44Z","updated_at":"2014-10-03T08:36:41Z","pushed_at":"2015-02-17T15:44:50Z","git_url":"git://github.com/kinglozzer/sapphire.git","ssh_url":"git@github.com:kinglozzer/sapphire.git","clone_url":"https://github.com/kinglozzer/sapphire.git","svn_url":"https://github.com/kinglozzer/sapphire","homepage":"http://silverstripe.org/","size":50174,"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":"silverstripe:3","ref":"3","sha":"3573075de0ffb0361e37c208d9657bff761280a7","user":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"repo":{"id":1318892,"name":"silverstripe-framework","full_name":"silverstripe/silverstripe-framework","owner":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe/silverstripe-framework","description":"SilverStripe Framework, the MVC framework that powers SilverStripe CMS","fork":false,"url":"https://api.github.com/repos/silverstripe/silverstripe-framework","forks_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/forks","keys_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/teams","hooks_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/hooks","issue_events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/events","assignees_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/tags","blobs_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/languages","stargazers_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/stargazers","contributors_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/contributors","subscribers_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/subscribers","subscription_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/subscription","commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/merges","archive_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/downloads","issues_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/releases{/id}","created_at":"2011-02-02T02:04:13Z","updated_at":"2015-02-17T10:54:46Z","pushed_at":"2015-02-17T15:44:25Z","git_url":"git://github.com/silverstripe/silverstripe-framework.git","ssh_url":"git@github.com:silverstripe/silverstripe-framework.git","clone_url":"https://github.com/silverstripe/silverstripe-framework.git","svn_url":"https://github.com/silverstripe/silverstripe-framework","homepage":"http://silverstripe.org/","size":97968,"stargazers_count":424,"watchers_count":424,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":462,"mirror_url":null,"open_issues_count":539,"forks":462,"open_issues":539,"watchers":424,"default_branch":"3.1"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/3799"},"html":{"href":"https://github.com/silverstripe/silverstripe-framework/pull/3799"},"issue":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3799"},"comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3799/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/3799/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/pulls/3799/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe/silverstripe-framework/statuses/9c73e97d858c98064f9521dd0307b60430982d1a"}}}}