{"action":"created","comment":{"url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/comments/24089629","id":24089629,"diff_hunk":"@@ -66,18 +68,24 @@ public function extract(BaseDiffItem $item)\n \n                 $idFieldName = str_replace(['OLD.', 'NEW.'], '', $idField);\n                 $itemRow = $item->getItem();\n-                $itemId = $itemRow[$idFieldName];\n-\n-                $storage = $this->getStorageFacility();\n-                $storage->save(\n-                    $action,\n-                    $insertList[JobTableFields::TYPE]['value'],\n-                    $itemId,\n-                    $item->getTimestamp(),\n-                    $this->getShopIds()\n-                );\n \n                 $statements = $relation->getStatements();\n+\n+                if (isset($insertList[JobTableFields::TYPE]['value'])) {\n+                    $itemId = $itemRow[$idFieldName];\n+\n+                    $storage = $this->getStorageFacility();\n+                    $storage->save(\n+                        $action,\n+                        $insertList[JobTableFields::TYPE]['value'],\n+                        $itemId,\n+                        $item->getTimestamp(),\n+                        $this->getShopIds()\n+                    );\n+                } elseif (empty($statements)) {\n+                    throw new \\LogicException('Relation does not have any effect');","path":"Sync/Extractor/DoctrineExtractor.php","position":null,"original_position":56,"commit_id":"80ca21fc19e07c75d06f6879769ef611cfb42253","original_commit_id":"0076c7ba16244b945740f283186914af6a03e08b","user":{"login":"GrandLTU","id":6538692,"avatar_url":"https://avatars.githubusercontent.com/u/6538692?v=3","gravatar_id":"","url":"https://api.github.com/users/GrandLTU","html_url":"https://github.com/GrandLTU","followers_url":"https://api.github.com/users/GrandLTU/followers","following_url":"https://api.github.com/users/GrandLTU/following{/other_user}","gists_url":"https://api.github.com/users/GrandLTU/gists{/gist_id}","starred_url":"https://api.github.com/users/GrandLTU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrandLTU/subscriptions","organizations_url":"https://api.github.com/users/GrandLTU/orgs","repos_url":"https://api.github.com/users/GrandLTU/repos","events_url":"https://api.github.com/users/GrandLTU/events{/privacy}","received_events_url":"https://api.github.com/users/GrandLTU/received_events","type":"User","site_admin":false},"body":"The one you just added :smile: ","created_at":"2015-02-04T15:16:02Z","updated_at":"2015-02-04T15:16:02Z","html_url":"https://github.com/ongr-io/ConnectionsBundle/pull/143#discussion_r24089629","pull_request_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/comments/24089629"},"html":{"href":"https://github.com/ongr-io/ConnectionsBundle/pull/143#discussion_r24089629"},"pull_request":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/143","id":28643849,"html_url":"https://github.com/ongr-io/ConnectionsBundle/pull/143","diff_url":"https://github.com/ongr-io/ConnectionsBundle/pull/143.diff","patch_url":"https://github.com/ongr-io/ConnectionsBundle/pull/143.patch","issue_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/143","number":143,"state":"open","locked":false,"title":"Relations","user":{"login":"GrandLTU","id":6538692,"avatar_url":"https://avatars.githubusercontent.com/u/6538692?v=3","gravatar_id":"","url":"https://api.github.com/users/GrandLTU","html_url":"https://github.com/GrandLTU","followers_url":"https://api.github.com/users/GrandLTU/followers","following_url":"https://api.github.com/users/GrandLTU/following{/other_user}","gists_url":"https://api.github.com/users/GrandLTU/gists{/gist_id}","starred_url":"https://api.github.com/users/GrandLTU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrandLTU/subscriptions","organizations_url":"https://api.github.com/users/GrandLTU/orgs","repos_url":"https://api.github.com/users/GrandLTU/repos","events_url":"https://api.github.com/users/GrandLTU/events{/privacy}","received_events_url":"https://api.github.com/users/GrandLTU/received_events","type":"User","site_admin":false},"body":"closes #106 ","created_at":"2015-02-04T14:51:26Z","updated_at":"2015-02-04T15:16:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c730d6ae07c2bc7eba236bd4fbd57640f7035f8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/143/commits","review_comments_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/143/comments","review_comment_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/143/comments","statuses_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/statuses/80ca21fc19e07c75d06f6879769ef611cfb42253","head":{"label":"GrandLTU:relations","ref":"relations","sha":"80ca21fc19e07c75d06f6879769ef611cfb42253","user":{"login":"GrandLTU","id":6538692,"avatar_url":"https://avatars.githubusercontent.com/u/6538692?v=3","gravatar_id":"","url":"https://api.github.com/users/GrandLTU","html_url":"https://github.com/GrandLTU","followers_url":"https://api.github.com/users/GrandLTU/followers","following_url":"https://api.github.com/users/GrandLTU/following{/other_user}","gists_url":"https://api.github.com/users/GrandLTU/gists{/gist_id}","starred_url":"https://api.github.com/users/GrandLTU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrandLTU/subscriptions","organizations_url":"https://api.github.com/users/GrandLTU/orgs","repos_url":"https://api.github.com/users/GrandLTU/repos","events_url":"https://api.github.com/users/GrandLTU/events{/privacy}","received_events_url":"https://api.github.com/users/GrandLTU/received_events","type":"User","site_admin":false},"repo":{"id":27817874,"name":"ConnectionsBundle","full_name":"GrandLTU/ConnectionsBundle","owner":{"login":"GrandLTU","id":6538692,"avatar_url":"https://avatars.githubusercontent.com/u/6538692?v=3","gravatar_id":"","url":"https://api.github.com/users/GrandLTU","html_url":"https://github.com/GrandLTU","followers_url":"https://api.github.com/users/GrandLTU/followers","following_url":"https://api.github.com/users/GrandLTU/following{/other_user}","gists_url":"https://api.github.com/users/GrandLTU/gists{/gist_id}","starred_url":"https://api.github.com/users/GrandLTU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrandLTU/subscriptions","organizations_url":"https://api.github.com/users/GrandLTU/orgs","repos_url":"https://api.github.com/users/GrandLTU/repos","events_url":"https://api.github.com/users/GrandLTU/events{/privacy}","received_events_url":"https://api.github.com/users/GrandLTU/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GrandLTU/ConnectionsBundle","description":"Data synchronisation and import functionality for ONGR","fork":true,"url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle","forks_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/forks","keys_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/teams","hooks_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/hooks","issue_events_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/issues/events{/number}","events_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/events","assignees_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/assignees{/user}","branches_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/branches{/branch}","tags_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/tags","blobs_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/languages","stargazers_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/stargazers","contributors_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/contributors","subscribers_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/subscribers","subscription_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/subscription","commits_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/contents/{+path}","compare_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/merges","archive_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/downloads","issues_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/issues{/number}","pulls_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/labels{/name}","releases_url":"https://api.github.com/repos/GrandLTU/ConnectionsBundle/releases{/id}","created_at":"2014-12-10T12:01:56Z","updated_at":"2015-02-04T14:50:10Z","pushed_at":"2015-02-04T15:14:07Z","git_url":"git://github.com/GrandLTU/ConnectionsBundle.git","ssh_url":"git@github.com:GrandLTU/ConnectionsBundle.git","clone_url":"https://github.com/GrandLTU/ConnectionsBundle.git","svn_url":"https://github.com/GrandLTU/ConnectionsBundle","homepage":null,"size":703,"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":"ongr-io:master","ref":"master","sha":"36a776f72b95de53004a63842d0355277eea48ef","user":{"login":"ongr-io","id":8971056,"avatar_url":"https://avatars.githubusercontent.com/u/8971056?v=3","gravatar_id":"","url":"https://api.github.com/users/ongr-io","html_url":"https://github.com/ongr-io","followers_url":"https://api.github.com/users/ongr-io/followers","following_url":"https://api.github.com/users/ongr-io/following{/other_user}","gists_url":"https://api.github.com/users/ongr-io/gists{/gist_id}","starred_url":"https://api.github.com/users/ongr-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ongr-io/subscriptions","organizations_url":"https://api.github.com/users/ongr-io/orgs","repos_url":"https://api.github.com/users/ongr-io/repos","events_url":"https://api.github.com/users/ongr-io/events{/privacy}","received_events_url":"https://api.github.com/users/ongr-io/received_events","type":"Organization","site_admin":false},"repo":{"id":27768781,"name":"ConnectionsBundle","full_name":"ongr-io/ConnectionsBundle","owner":{"login":"ongr-io","id":8971056,"avatar_url":"https://avatars.githubusercontent.com/u/8971056?v=3","gravatar_id":"","url":"https://api.github.com/users/ongr-io","html_url":"https://github.com/ongr-io","followers_url":"https://api.github.com/users/ongr-io/followers","following_url":"https://api.github.com/users/ongr-io/following{/other_user}","gists_url":"https://api.github.com/users/ongr-io/gists{/gist_id}","starred_url":"https://api.github.com/users/ongr-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ongr-io/subscriptions","organizations_url":"https://api.github.com/users/ongr-io/orgs","repos_url":"https://api.github.com/users/ongr-io/repos","events_url":"https://api.github.com/users/ongr-io/events{/privacy}","received_events_url":"https://api.github.com/users/ongr-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ongr-io/ConnectionsBundle","description":"Data synchronisation and import functionality for ONGR","fork":false,"url":"https://api.github.com/repos/ongr-io/ConnectionsBundle","forks_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/forks","keys_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/teams","hooks_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/hooks","issue_events_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/events","assignees_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/tags","blobs_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/languages","stargazers_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/stargazers","contributors_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/contributors","subscribers_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/subscribers","subscription_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/subscription","commits_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/merges","archive_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/downloads","issues_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/labels{/name}","releases_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/releases{/id}","created_at":"2014-12-09T13:52:39Z","updated_at":"2015-02-04T08:35:25Z","pushed_at":"2015-02-04T08:35:25Z","git_url":"git://github.com/ongr-io/ConnectionsBundle.git","ssh_url":"git@github.com:ongr-io/ConnectionsBundle.git","clone_url":"https://github.com/ongr-io/ConnectionsBundle.git","svn_url":"https://github.com/ongr-io/ConnectionsBundle","homepage":null,"size":2064,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":12,"forks":11,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/143"},"html":{"href":"https://github.com/ongr-io/ConnectionsBundle/pull/143"},"issue":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/143"},"comments":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/statuses/80ca21fc19e07c75d06f6879769ef611cfb42253"}}}}