{"action":"created","comment":{"url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/comments/244528664","pull_request_review_id":188433335,"id":244528664,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDUyODY2NA==","diff_hunk":"@@ -329,4 +332,34 @@ protected function _doAction($action, EntityInterface $entity, $prop, $value = n\n                 break;\n         }\n     }\n+\n+    /**\n+     * Removes the primary key from the entity being duplicated.  If the entity has a composite key, you must\n+     * specify which field we wish to preserve\n+     *\n+     * @param EntityInterface $entity\n+     * @param $object\n+     * @throws \\Exception\n+     */\n+    protected function removePrimaryKey(EntityInterface $entity, $object)\n+    {\n+        if (is_array($object->getPrimaryKey())) {\n+\n+            $compositeKey = $object->getPrimaryKey();","path":"src/Model/Behavior/DuplicatableBehavior.php","position":null,"original_position":44,"commit_id":"dff01d2bc027a8213dbc322294a017c72fe723c7","original_commit_id":"2ec46289d83af88e987fb72c426e856e1d9dd7bc","user":{"login":"birdy247","id":6965315,"node_id":"MDQ6VXNlcjY5NjUzMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/6965315?v=4","gravatar_id":"","url":"https://api.github.com/users/birdy247","html_url":"https://github.com/birdy247","followers_url":"https://api.github.com/users/birdy247/followers","following_url":"https://api.github.com/users/birdy247/following{/other_user}","gists_url":"https://api.github.com/users/birdy247/gists{/gist_id}","starred_url":"https://api.github.com/users/birdy247/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/birdy247/subscriptions","organizations_url":"https://api.github.com/users/birdy247/orgs","repos_url":"https://api.github.com/users/birdy247/repos","events_url":"https://api.github.com/users/birdy247/events{/privacy}","received_events_url":"https://api.github.com/users/birdy247/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2018-12-30T09:32:01Z","updated_at":"2018-12-30T09:32:02Z","html_url":"https://github.com/riesenia/cakephp-duplicatable/pull/38#discussion_r244528664","pull_request_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/38","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/comments/244528664"},"html":{"href":"https://github.com/riesenia/cakephp-duplicatable/pull/38#discussion_r244528664"},"pull_request":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/38"}},"in_reply_to_id":244503531},"pull_request":{"url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/38","id":241454333,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNDU0MzMz","html_url":"https://github.com/riesenia/cakephp-duplicatable/pull/38","diff_url":"https://github.com/riesenia/cakephp-duplicatable/pull/38.diff","patch_url":"https://github.com/riesenia/cakephp-duplicatable/pull/38.patch","issue_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/issues/38","number":38,"state":"open","locked":false,"title":"handling composite key support","user":{"login":"birdy247","id":6965315,"node_id":"MDQ6VXNlcjY5NjUzMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/6965315?v=4","gravatar_id":"","url":"https://api.github.com/users/birdy247","html_url":"https://github.com/birdy247","followers_url":"https://api.github.com/users/birdy247/followers","following_url":"https://api.github.com/users/birdy247/following{/other_user}","gists_url":"https://api.github.com/users/birdy247/gists{/gist_id}","starred_url":"https://api.github.com/users/birdy247/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/birdy247/subscriptions","organizations_url":"https://api.github.com/users/birdy247/orgs","repos_url":"https://api.github.com/users/birdy247/repos","events_url":"https://api.github.com/users/birdy247/events{/privacy}","received_events_url":"https://api.github.com/users/birdy247/received_events","type":"User","site_admin":false},"body":"Adds support for duplicating tables with composite keys","created_at":"2018-12-29T16:32:21Z","updated_at":"2018-12-30T09:32:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"382ac4ce253d40e162cafd6041c42022b972e22f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/38/commits","review_comments_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/38/comments","review_comment_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/issues/38/comments","statuses_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/statuses/dff01d2bc027a8213dbc322294a017c72fe723c7","head":{"label":"birdy247:composite-keys","ref":"composite-keys","sha":"dff01d2bc027a8213dbc322294a017c72fe723c7","user":{"login":"birdy247","id":6965315,"node_id":"MDQ6VXNlcjY5NjUzMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/6965315?v=4","gravatar_id":"","url":"https://api.github.com/users/birdy247","html_url":"https://github.com/birdy247","followers_url":"https://api.github.com/users/birdy247/followers","following_url":"https://api.github.com/users/birdy247/following{/other_user}","gists_url":"https://api.github.com/users/birdy247/gists{/gist_id}","starred_url":"https://api.github.com/users/birdy247/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/birdy247/subscriptions","organizations_url":"https://api.github.com/users/birdy247/orgs","repos_url":"https://api.github.com/users/birdy247/repos","events_url":"https://api.github.com/users/birdy247/events{/privacy}","received_events_url":"https://api.github.com/users/birdy247/received_events","type":"User","site_admin":false},"repo":{"id":61138487,"node_id":"MDEwOlJlcG9zaXRvcnk2MTEzODQ4Nw==","name":"cakephp-duplicatable","full_name":"birdy247/cakephp-duplicatable","private":false,"owner":{"login":"birdy247","id":6965315,"node_id":"MDQ6VXNlcjY5NjUzMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/6965315?v=4","gravatar_id":"","url":"https://api.github.com/users/birdy247","html_url":"https://github.com/birdy247","followers_url":"https://api.github.com/users/birdy247/followers","following_url":"https://api.github.com/users/birdy247/following{/other_user}","gists_url":"https://api.github.com/users/birdy247/gists{/gist_id}","starred_url":"https://api.github.com/users/birdy247/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/birdy247/subscriptions","organizations_url":"https://api.github.com/users/birdy247/orgs","repos_url":"https://api.github.com/users/birdy247/repos","events_url":"https://api.github.com/users/birdy247/events{/privacy}","received_events_url":"https://api.github.com/users/birdy247/received_events","type":"User","site_admin":false},"html_url":"https://github.com/birdy247/cakephp-duplicatable","description":"CakePHP plugin for duplicating entities including related data","fork":true,"url":"https://api.github.com/repos/birdy247/cakephp-duplicatable","forks_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/forks","keys_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/teams","hooks_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/hooks","issue_events_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/issues/events{/number}","events_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/events","assignees_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/assignees{/user}","branches_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/branches{/branch}","tags_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/tags","blobs_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/git/refs{/sha}","trees_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/statuses/{sha}","languages_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/languages","stargazers_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/stargazers","contributors_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/contributors","subscribers_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/subscribers","subscription_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/subscription","commits_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/commits{/sha}","git_commits_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/git/commits{/sha}","comments_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/comments{/number}","issue_comment_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/issues/comments{/number}","contents_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/contents/{+path}","compare_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/merges","archive_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/downloads","issues_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/issues{/number}","pulls_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/pulls{/number}","milestones_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/milestones{/number}","notifications_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/labels{/name}","releases_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/releases{/id}","deployments_url":"https://api.github.com/repos/birdy247/cakephp-duplicatable/deployments","created_at":"2016-06-14T16:28:30Z","updated_at":"2018-12-29T12:43:42Z","pushed_at":"2018-12-30T09:29:31Z","git_url":"git://github.com/birdy247/cakephp-duplicatable.git","ssh_url":"git@github.com:birdy247/cakephp-duplicatable.git","clone_url":"https://github.com/birdy247/cakephp-duplicatable.git","svn_url":"https://github.com/birdy247/cakephp-duplicatable","homepage":"","size":69,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"riesenia:master","ref":"master","sha":"6ac4f411e1080ec68f4ce4d16a7b648f8aac64da","user":{"login":"riesenia","id":10023734,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDIzNzM0","avatar_url":"https://avatars2.githubusercontent.com/u/10023734?v=4","gravatar_id":"","url":"https://api.github.com/users/riesenia","html_url":"https://github.com/riesenia","followers_url":"https://api.github.com/users/riesenia/followers","following_url":"https://api.github.com/users/riesenia/following{/other_user}","gists_url":"https://api.github.com/users/riesenia/gists{/gist_id}","starred_url":"https://api.github.com/users/riesenia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riesenia/subscriptions","organizations_url":"https://api.github.com/users/riesenia/orgs","repos_url":"https://api.github.com/users/riesenia/repos","events_url":"https://api.github.com/users/riesenia/events{/privacy}","received_events_url":"https://api.github.com/users/riesenia/received_events","type":"Organization","site_admin":false},"repo":{"id":45679037,"node_id":"MDEwOlJlcG9zaXRvcnk0NTY3OTAzNw==","name":"cakephp-duplicatable","full_name":"riesenia/cakephp-duplicatable","private":false,"owner":{"login":"riesenia","id":10023734,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMDIzNzM0","avatar_url":"https://avatars2.githubusercontent.com/u/10023734?v=4","gravatar_id":"","url":"https://api.github.com/users/riesenia","html_url":"https://github.com/riesenia","followers_url":"https://api.github.com/users/riesenia/followers","following_url":"https://api.github.com/users/riesenia/following{/other_user}","gists_url":"https://api.github.com/users/riesenia/gists{/gist_id}","starred_url":"https://api.github.com/users/riesenia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riesenia/subscriptions","organizations_url":"https://api.github.com/users/riesenia/orgs","repos_url":"https://api.github.com/users/riesenia/repos","events_url":"https://api.github.com/users/riesenia/events{/privacy}","received_events_url":"https://api.github.com/users/riesenia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/riesenia/cakephp-duplicatable","description":"CakePHP plugin for duplicating entities including related data","fork":false,"url":"https://api.github.com/repos/riesenia/cakephp-duplicatable","forks_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/forks","keys_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/teams","hooks_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/hooks","issue_events_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/issues/events{/number}","events_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/events","assignees_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/assignees{/user}","branches_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/branches{/branch}","tags_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/tags","blobs_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/git/refs{/sha}","trees_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/statuses/{sha}","languages_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/languages","stargazers_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/stargazers","contributors_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/contributors","subscribers_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/subscribers","subscription_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/subscription","commits_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/commits{/sha}","git_commits_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/git/commits{/sha}","comments_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/comments{/number}","issue_comment_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/issues/comments{/number}","contents_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/contents/{+path}","compare_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/merges","archive_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/downloads","issues_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/issues{/number}","pulls_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls{/number}","milestones_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/milestones{/number}","notifications_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/labels{/name}","releases_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/releases{/id}","deployments_url":"https://api.github.com/repos/riesenia/cakephp-duplicatable/deployments","created_at":"2015-11-06T11:47:14Z","updated_at":"2018-11-29T16:22:40Z","pushed_at":"2018-12-30T09:29:32Z","git_url":"git://github.com/riesenia/cakephp-duplicatable.git","ssh_url":"git@github.com:riesenia/cakephp-duplicatable.git","clone_url":"https://github.com/riesenia/cakephp-duplicatable.git","svn_url":"https://github.com/riesenia/cakephp-duplicatable","homepage":"","size":65,"stargazers_count":33,"watchers_count":33,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":14,"open_issues":3,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/38"},"html":{"href":"https://github.com/riesenia/cakephp-duplicatable/pull/38"},"issue":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/issues/38"},"comments":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/riesenia/cakephp-duplicatable/statuses/dff01d2bc027a8213dbc322294a017c72fe723c7"}},"author_association":"NONE"}}
{"actor":{"display_login":"birdy247"}}