{"action":"created","comment":{"url":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments/46091198","id":46091198,"diff_hunk":"@@ -0,0 +1,67 @@\n+<?php\n+\n+namespace Doctrine\\Tests\\ORM\\Functional;\n+\n+use Doctrine\\ORM\\OptimisticLockException;\n+use Doctrine\\ORM\\ORMException;\n+use Doctrine\\Tests\\Models\\VersionedOneToMany\\Article;\n+use Doctrine\\Tests\\Models\\VersionedOneToMany\\Category;\n+use Doctrine\\Tests\\Models\\VersionedOneToMany\\Tag;\n+\n+/**\n+ *\n+ * @group MergeVersionedOneToMany\n+ */\n+class MergeVersionedOneToManyTest extends \\Doctrine\\Tests\\OrmFunctionalTestCase\n+{\n+    protected function setUp()\n+    {\n+        parent::setUp();\n+\n+        try {\n+            $this->_schemaTool->createSchema(\n+                [\n+                    $this->_em->getClassMetadata(Category::class),\n+                    $this->_em->getClassMetadata(Article::class),","path":"tests/Doctrine/Tests/ORM/Functional/MergeVersionedOneToManyTest.php","position":25,"original_position":25,"commit_id":"832adae6b476299b4ddba1551f55d14d25184cf6","original_commit_id":"832adae6b476299b4ddba1551f55d14d25184cf6","user":{"login":"moroine","id":4658821,"avatar_url":"https://avatars.githubusercontent.com/u/4658821?v=3","gravatar_id":"","url":"https://api.github.com/users/moroine","html_url":"https://github.com/moroine","followers_url":"https://api.github.com/users/moroine/followers","following_url":"https://api.github.com/users/moroine/following{/other_user}","gists_url":"https://api.github.com/users/moroine/gists{/gist_id}","starred_url":"https://api.github.com/users/moroine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moroine/subscriptions","organizations_url":"https://api.github.com/users/moroine/orgs","repos_url":"https://api.github.com/users/moroine/repos","events_url":"https://api.github.com/users/moroine/events{/privacy}","received_events_url":"https://api.github.com/users/moroine/received_events","type":"User","site_admin":false},"body":"I will remove these used of Article::class as it break the php5.4 compatibility","created_at":"2015-11-29T12:05:15Z","updated_at":"2015-11-29T12:05:15Z","html_url":"https://github.com/doctrine/doctrine2/pull/1573#discussion_r46091198","pull_request_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1573","_links":{"self":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments/46091198"},"html":{"href":"https://github.com/doctrine/doctrine2/pull/1573#discussion_r46091198"},"pull_request":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/1573"}}},"pull_request":{"url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1573","id":52011000,"html_url":"https://github.com/doctrine/doctrine2/pull/1573","diff_url":"https://github.com/doctrine/doctrine2/pull/1573.diff","patch_url":"https://github.com/doctrine/doctrine2/pull/1573.patch","issue_url":"https://api.github.com/repos/doctrine/doctrine2/issues/1573","number":1573,"state":"open","locked":false,"title":"Merge entity associated to versioned entity","user":{"login":"moroine","id":4658821,"avatar_url":"https://avatars.githubusercontent.com/u/4658821?v=3","gravatar_id":"","url":"https://api.github.com/users/moroine","html_url":"https://github.com/moroine","followers_url":"https://api.github.com/users/moroine/followers","following_url":"https://api.github.com/users/moroine/following{/other_user}","gists_url":"https://api.github.com/users/moroine/gists{/gist_id}","starred_url":"https://api.github.com/users/moroine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moroine/subscriptions","organizations_url":"https://api.github.com/users/moroine/orgs","repos_url":"https://api.github.com/users/moroine/repos","events_url":"https://api.github.com/users/moroine/events{/privacy}","received_events_url":"https://api.github.com/users/moroine/received_events","type":"User","site_admin":false},"body":"I wrote a unit test that reveal the bug and a fix.\r\n\r\nIf I merge an entity which is associated to a versioned entity this fire a OptimisticLockException as the managedCopy is a Proxy so the version attribute is always null.\r\n\r\nI think when we compare version attribute, we should skip it when one of the entity or the managed copy is a Proxy not initialized.\r\n\r\n","created_at":"2015-11-27T16:33:35Z","updated_at":"2015-11-29T12:05:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56d4306b2b721b73a57854a61f7a9492dc718f70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1573/commits","review_comments_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/1573/comments","review_comment_url":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doctrine/doctrine2/issues/1573/comments","statuses_url":"https://api.github.com/repos/doctrine/doctrine2/statuses/832adae6b476299b4ddba1551f55d14d25184cf6","head":{"label":"AdactiveSAS:MergeVersioned","ref":"MergeVersioned","sha":"832adae6b476299b4ddba1551f55d14d25184cf6","user":{"login":"AdactiveSAS","id":11718077,"avatar_url":"https://avatars.githubusercontent.com/u/11718077?v=3","gravatar_id":"","url":"https://api.github.com/users/AdactiveSAS","html_url":"https://github.com/AdactiveSAS","followers_url":"https://api.github.com/users/AdactiveSAS/followers","following_url":"https://api.github.com/users/AdactiveSAS/following{/other_user}","gists_url":"https://api.github.com/users/AdactiveSAS/gists{/gist_id}","starred_url":"https://api.github.com/users/AdactiveSAS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdactiveSAS/subscriptions","organizations_url":"https://api.github.com/users/AdactiveSAS/orgs","repos_url":"https://api.github.com/users/AdactiveSAS/repos","events_url":"https://api.github.com/users/AdactiveSAS/events{/privacy}","received_events_url":"https://api.github.com/users/AdactiveSAS/received_events","type":"Organization","site_admin":false},"repo":{"id":39137003,"name":"doctrine2","full_name":"AdactiveSAS/doctrine2","owner":{"login":"AdactiveSAS","id":11718077,"avatar_url":"https://avatars.githubusercontent.com/u/11718077?v=3","gravatar_id":"","url":"https://api.github.com/users/AdactiveSAS","html_url":"https://github.com/AdactiveSAS","followers_url":"https://api.github.com/users/AdactiveSAS/followers","following_url":"https://api.github.com/users/AdactiveSAS/following{/other_user}","gists_url":"https://api.github.com/users/AdactiveSAS/gists{/gist_id}","starred_url":"https://api.github.com/users/AdactiveSAS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdactiveSAS/subscriptions","organizations_url":"https://api.github.com/users/AdactiveSAS/orgs","repos_url":"https://api.github.com/users/AdactiveSAS/repos","events_url":"https://api.github.com/users/AdactiveSAS/events{/privacy}","received_events_url":"https://api.github.com/users/AdactiveSAS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AdactiveSAS/doctrine2","description":"Doctrine 2 Object Relational Mapper (ORM)","fork":true,"url":"https://api.github.com/repos/AdactiveSAS/doctrine2","forks_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/forks","keys_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/teams","hooks_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/hooks","issue_events_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/issues/events{/number}","events_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/events","assignees_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/assignees{/user}","branches_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/branches{/branch}","tags_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/tags","blobs_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/statuses/{sha}","languages_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/languages","stargazers_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/stargazers","contributors_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/contributors","subscribers_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/subscribers","subscription_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/subscription","commits_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/contents/{+path}","compare_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/merges","archive_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/downloads","issues_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/issues{/number}","pulls_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/pulls{/number}","milestones_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/milestones{/number}","notifications_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/labels{/name}","releases_url":"https://api.github.com/repos/AdactiveSAS/doctrine2/releases{/id}","created_at":"2015-07-15T13:00:54Z","updated_at":"2015-07-15T13:00:58Z","pushed_at":"2015-11-27T16:48:17Z","git_url":"git://github.com/AdactiveSAS/doctrine2.git","ssh_url":"git@github.com:AdactiveSAS/doctrine2.git","clone_url":"https://github.com/AdactiveSAS/doctrine2.git","svn_url":"https://github.com/AdactiveSAS/doctrine2","homepage":"http://www.doctrine-project.org","size":27072,"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":"doctrine:master","ref":"master","sha":"599f99471ef1e3aa47b79e45c02a72553bc1b786","user":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"repo":{"id":597887,"name":"doctrine2","full_name":"doctrine/doctrine2","owner":{"login":"doctrine","id":209254,"avatar_url":"https://avatars.githubusercontent.com/u/209254?v=3","gravatar_id":"","url":"https://api.github.com/users/doctrine","html_url":"https://github.com/doctrine","followers_url":"https://api.github.com/users/doctrine/followers","following_url":"https://api.github.com/users/doctrine/following{/other_user}","gists_url":"https://api.github.com/users/doctrine/gists{/gist_id}","starred_url":"https://api.github.com/users/doctrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctrine/subscriptions","organizations_url":"https://api.github.com/users/doctrine/orgs","repos_url":"https://api.github.com/users/doctrine/repos","events_url":"https://api.github.com/users/doctrine/events{/privacy}","received_events_url":"https://api.github.com/users/doctrine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doctrine/doctrine2","description":"Doctrine 2 Object Relational Mapper (ORM)","fork":false,"url":"https://api.github.com/repos/doctrine/doctrine2","forks_url":"https://api.github.com/repos/doctrine/doctrine2/forks","keys_url":"https://api.github.com/repos/doctrine/doctrine2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctrine/doctrine2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctrine/doctrine2/teams","hooks_url":"https://api.github.com/repos/doctrine/doctrine2/hooks","issue_events_url":"https://api.github.com/repos/doctrine/doctrine2/issues/events{/number}","events_url":"https://api.github.com/repos/doctrine/doctrine2/events","assignees_url":"https://api.github.com/repos/doctrine/doctrine2/assignees{/user}","branches_url":"https://api.github.com/repos/doctrine/doctrine2/branches{/branch}","tags_url":"https://api.github.com/repos/doctrine/doctrine2/tags","blobs_url":"https://api.github.com/repos/doctrine/doctrine2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctrine/doctrine2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctrine/doctrine2/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctrine/doctrine2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctrine/doctrine2/statuses/{sha}","languages_url":"https://api.github.com/repos/doctrine/doctrine2/languages","stargazers_url":"https://api.github.com/repos/doctrine/doctrine2/stargazers","contributors_url":"https://api.github.com/repos/doctrine/doctrine2/contributors","subscribers_url":"https://api.github.com/repos/doctrine/doctrine2/subscribers","subscription_url":"https://api.github.com/repos/doctrine/doctrine2/subscription","commits_url":"https://api.github.com/repos/doctrine/doctrine2/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctrine/doctrine2/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctrine/doctrine2/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctrine/doctrine2/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctrine/doctrine2/contents/{+path}","compare_url":"https://api.github.com/repos/doctrine/doctrine2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctrine/doctrine2/merges","archive_url":"https://api.github.com/repos/doctrine/doctrine2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctrine/doctrine2/downloads","issues_url":"https://api.github.com/repos/doctrine/doctrine2/issues{/number}","pulls_url":"https://api.github.com/repos/doctrine/doctrine2/pulls{/number}","milestones_url":"https://api.github.com/repos/doctrine/doctrine2/milestones{/number}","notifications_url":"https://api.github.com/repos/doctrine/doctrine2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctrine/doctrine2/labels{/name}","releases_url":"https://api.github.com/repos/doctrine/doctrine2/releases{/id}","created_at":"2010-04-06T21:42:59Z","updated_at":"2015-11-29T08:47:21Z","pushed_at":"2015-11-27T18:44:31Z","git_url":"git://github.com/doctrine/doctrine2.git","ssh_url":"git@github.com:doctrine/doctrine2.git","clone_url":"https://github.com/doctrine/doctrine2.git","svn_url":"https://github.com/doctrine/doctrine2","homepage":"http://www.doctrine-project.org","size":31113,"stargazers_count":2809,"watchers_count":2809,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1402,"mirror_url":null,"open_issues_count":91,"forks":1402,"open_issues":91,"watchers":2809,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/1573"},"html":{"href":"https://github.com/doctrine/doctrine2/pull/1573"},"issue":{"href":"https://api.github.com/repos/doctrine/doctrine2/issues/1573"},"comments":{"href":"https://api.github.com/repos/doctrine/doctrine2/issues/1573/comments"},"review_comments":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/1573/comments"},"review_comment":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doctrine/doctrine2/pulls/1573/commits"},"statuses":{"href":"https://api.github.com/repos/doctrine/doctrine2/statuses/832adae6b476299b4ddba1551f55d14d25184cf6"}}}}