{"action":"created","comment":{"url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/comments/26649859","id":26649859,"diff_hunk":"@@ -50,7 +50,13 @@ class <?php echo $this->getGeneratedModuleName() ?>Actions extends <?php echo $t\n \n <?php include dirname(__FILE__).'/../../parts/postValidate.php' ?>\n \n+<?php $mode = '' ?>\n <?php include dirname(__FILE__).'/../../parts/query.php' ?>\n+<?php $mode = sfDoctrineRestGenerator::GET_MODE_LIST ?>\n+<?php include dirname(__FILE__).'/../../parts/query.php' ?>\n+<?php $mode = sfDoctrineRestGenerator::GET_MODE_SHOW ?>\n+<?php include dirname(__FILE__).'/../../parts/query.php' ?>","path":"data/generator/sfDoctrineRestGenerator/default/template/actions/actions.class.php","position":9,"original_position":9,"commit_id":"025f773cb2b4ef13bd3568a44e8123e51809c341","original_commit_id":"025f773cb2b4ef13bd3568a44e8123e51809c341","user":{"login":"andesk","id":176607,"avatar_url":"https://avatars.githubusercontent.com/u/176607?v=3","gravatar_id":"","url":"https://api.github.com/users/andesk","html_url":"https://github.com/andesk","followers_url":"https://api.github.com/users/andesk/followers","following_url":"https://api.github.com/users/andesk/following{/other_user}","gists_url":"https://api.github.com/users/andesk/gists{/gist_id}","starred_url":"https://api.github.com/users/andesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andesk/subscriptions","organizations_url":"https://api.github.com/users/andesk/orgs","repos_url":"https://api.github.com/users/andesk/repos","events_url":"https://api.github.com/users/andesk/events{/privacy}","received_events_url":"https://api.github.com/users/andesk/received_events","type":"User","site_admin":false},"body":"Maybe it is not the best solution working like this, but it reduces code duplication a lot...","created_at":"2015-03-18T09:55:55Z","updated_at":"2015-03-18T09:55:55Z","html_url":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin/pull/42#discussion_r26649859","pull_request_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/comments/26649859"},"html":{"href":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin/pull/42#discussion_r26649859"},"pull_request":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/42","id":31413500,"html_url":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin/pull/42","diff_url":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin/pull/42.diff","patch_url":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin/pull/42.patch","issue_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/issues/42","number":42,"state":"open","locked":false,"title":"Split of \"get\" config for list and show actions","user":{"login":"andesk","id":176607,"avatar_url":"https://avatars.githubusercontent.com/u/176607?v=3","gravatar_id":"","url":"https://api.github.com/users/andesk","html_url":"https://github.com/andesk","followers_url":"https://api.github.com/users/andesk/followers","following_url":"https://api.github.com/users/andesk/following{/other_user}","gists_url":"https://api.github.com/users/andesk/gists{/gist_id}","starred_url":"https://api.github.com/users/andesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andesk/subscriptions","organizations_url":"https://api.github.com/users/andesk/orgs","repos_url":"https://api.github.com/users/andesk/repos","events_url":"https://api.github.com/users/andesk/events{/privacy}","received_events_url":"https://api.github.com/users/andesk/received_events","type":"User","site_admin":false},"body":"As we needed a different output of attributes depending on list/show action we introduced a more or less backwards compatible approach to provide this in the plugin. See adjusted README file.\r\n\r\nDo be able to have different logic in the action we introduced several copied methods generated for both get actions. For example instead of function query() we have now a queryList() and a queryShow(). So this somehow breaks bc if a developer would have overwritten the query() method in the actions class. The configuration itself \"inherits\" and is only used if a more concrete configuration is set for get_list or get_show.\r\n\r\nWhat do you think about that improvement?\r\n\r\nMotivation is e.g. to reduce query complexity for list by not embedding any relations and doing this only in show).","created_at":"2015-03-18T09:54:33Z","updated_at":"2015-03-18T09:55:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6aba36d82db6455b4fd9ee21798692ffc7d9216","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/42/commits","review_comments_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/42/comments","review_comment_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/issues/42/comments","statuses_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/statuses/025f773cb2b4ef13bd3568a44e8123e51809c341","head":{"label":"andesk:split-get-config","ref":"split-get-config","sha":"025f773cb2b4ef13bd3568a44e8123e51809c341","user":{"login":"andesk","id":176607,"avatar_url":"https://avatars.githubusercontent.com/u/176607?v=3","gravatar_id":"","url":"https://api.github.com/users/andesk","html_url":"https://github.com/andesk","followers_url":"https://api.github.com/users/andesk/followers","following_url":"https://api.github.com/users/andesk/following{/other_user}","gists_url":"https://api.github.com/users/andesk/gists{/gist_id}","starred_url":"https://api.github.com/users/andesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andesk/subscriptions","organizations_url":"https://api.github.com/users/andesk/orgs","repos_url":"https://api.github.com/users/andesk/repos","events_url":"https://api.github.com/users/andesk/events{/privacy}","received_events_url":"https://api.github.com/users/andesk/received_events","type":"User","site_admin":false},"repo":{"id":32395884,"name":"sfDoctrineRestGeneratorPlugin","full_name":"andesk/sfDoctrineRestGeneratorPlugin","owner":{"login":"andesk","id":176607,"avatar_url":"https://avatars.githubusercontent.com/u/176607?v=3","gravatar_id":"","url":"https://api.github.com/users/andesk","html_url":"https://github.com/andesk","followers_url":"https://api.github.com/users/andesk/followers","following_url":"https://api.github.com/users/andesk/following{/other_user}","gists_url":"https://api.github.com/users/andesk/gists{/gist_id}","starred_url":"https://api.github.com/users/andesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andesk/subscriptions","organizations_url":"https://api.github.com/users/andesk/orgs","repos_url":"https://api.github.com/users/andesk/repos","events_url":"https://api.github.com/users/andesk/events{/privacy}","received_events_url":"https://api.github.com/users/andesk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andesk/sfDoctrineRestGeneratorPlugin","description":"This symfony plugin permits to generate REST modules bound to Doctrine models. It allows to easily create REST webservices, and provides an extensible framework for data exchange. This git repository is the official git mirror of the SVN repository.","fork":true,"url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin","forks_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/forks","keys_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/teams","hooks_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/hooks","issue_events_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/issues/events{/number}","events_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/events","assignees_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/assignees{/user}","branches_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/branches{/branch}","tags_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/tags","blobs_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/statuses/{sha}","languages_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/languages","stargazers_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/stargazers","contributors_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/contributors","subscribers_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/subscribers","subscription_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/subscription","commits_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/contents/{+path}","compare_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/merges","archive_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/downloads","issues_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/issues{/number}","pulls_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/pulls{/number}","milestones_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/milestones{/number}","notifications_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/labels{/name}","releases_url":"https://api.github.com/repos/andesk/sfDoctrineRestGeneratorPlugin/releases{/id}","created_at":"2015-03-17T13:45:46Z","updated_at":"2015-03-17T13:48:45Z","pushed_at":"2015-03-18T09:12:29Z","git_url":"git://github.com/andesk/sfDoctrineRestGeneratorPlugin.git","ssh_url":"git@github.com:andesk/sfDoctrineRestGeneratorPlugin.git","clone_url":"https://github.com/andesk/sfDoctrineRestGeneratorPlugin.git","svn_url":"https://github.com/andesk/sfDoctrineRestGeneratorPlugin","homepage":"http://www.symfony-project.org/plugins/sfDoctrineRestGeneratorPlugin","size":238,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"xavierlacot:master","ref":"master","sha":"d090cd8407069aef79c24e0181f4bd17fa910b97","user":{"login":"xavierlacot","id":177293,"avatar_url":"https://avatars.githubusercontent.com/u/177293?v=3","gravatar_id":"","url":"https://api.github.com/users/xavierlacot","html_url":"https://github.com/xavierlacot","followers_url":"https://api.github.com/users/xavierlacot/followers","following_url":"https://api.github.com/users/xavierlacot/following{/other_user}","gists_url":"https://api.github.com/users/xavierlacot/gists{/gist_id}","starred_url":"https://api.github.com/users/xavierlacot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavierlacot/subscriptions","organizations_url":"https://api.github.com/users/xavierlacot/orgs","repos_url":"https://api.github.com/users/xavierlacot/repos","events_url":"https://api.github.com/users/xavierlacot/events{/privacy}","received_events_url":"https://api.github.com/users/xavierlacot/received_events","type":"User","site_admin":false},"repo":{"id":1107694,"name":"sfDoctrineRestGeneratorPlugin","full_name":"xavierlacot/sfDoctrineRestGeneratorPlugin","owner":{"login":"xavierlacot","id":177293,"avatar_url":"https://avatars.githubusercontent.com/u/177293?v=3","gravatar_id":"","url":"https://api.github.com/users/xavierlacot","html_url":"https://github.com/xavierlacot","followers_url":"https://api.github.com/users/xavierlacot/followers","following_url":"https://api.github.com/users/xavierlacot/following{/other_user}","gists_url":"https://api.github.com/users/xavierlacot/gists{/gist_id}","starred_url":"https://api.github.com/users/xavierlacot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavierlacot/subscriptions","organizations_url":"https://api.github.com/users/xavierlacot/orgs","repos_url":"https://api.github.com/users/xavierlacot/repos","events_url":"https://api.github.com/users/xavierlacot/events{/privacy}","received_events_url":"https://api.github.com/users/xavierlacot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin","description":"This symfony plugin permits to generate REST modules bound to Doctrine models. It allows to easily create REST webservices, and provides an extensible framework for data exchange. This git repository is the official git mirror of the SVN repository.","fork":false,"url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin","forks_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/forks","keys_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/teams","hooks_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/hooks","issue_events_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/issues/events{/number}","events_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/events","assignees_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/assignees{/user}","branches_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/branches{/branch}","tags_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/tags","blobs_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/statuses/{sha}","languages_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/languages","stargazers_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/stargazers","contributors_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/contributors","subscribers_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/subscribers","subscription_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/subscription","commits_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/contents/{+path}","compare_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/merges","archive_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/downloads","issues_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/issues{/number}","pulls_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls{/number}","milestones_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/milestones{/number}","notifications_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/labels{/name}","releases_url":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/releases{/id}","created_at":"2010-11-24T00:52:30Z","updated_at":"2015-03-13T18:11:45Z","pushed_at":"2014-08-29T10:11:56Z","git_url":"git://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin.git","ssh_url":"git@github.com:xavierlacot/sfDoctrineRestGeneratorPlugin.git","clone_url":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin.git","svn_url":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin","homepage":"http://www.symfony-project.org/plugins/sfDoctrineRestGeneratorPlugin","size":754,"stargazers_count":44,"watchers_count":44,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":18,"forks":21,"open_issues":18,"watchers":44,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/42"},"html":{"href":"https://github.com/xavierlacot/sfDoctrineRestGeneratorPlugin/pull/42"},"issue":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/issues/42"},"comments":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/xavierlacot/sfDoctrineRestGeneratorPlugin/statuses/025f773cb2b4ef13bd3568a44e8123e51809c341"}}}}