{"action":"created","comment":{"url":"https://api.github.com/repos/candlepin/candlepin/pulls/comments/56401077","id":56401077,"diff_hunk":"@@ -148,6 +172,103 @@ public Content(String id) {\n         this.setId(id);\n     }\n \n+    /**\n+     * Creates a shallow copy of the specified source content. Owners, attributes and content are\n+     * not duplicated, but the joining objects are (ContentAttribute, ContentContent, etc.).\n+     * <p/>\n+     * Unlike the merge method, all properties from the source content are copied, including the\n+     * state of any null collections and any identifier fields.\n+     *\n+     * @param source\n+     *  The Content instance to copy\n+     */\n+    protected Content(Content source) {\n+        this.setUuid(source.getUuid());\n+        this.setId(source.getId());\n+\n+        this.setCreated(source.getCreated());","path":"server/src/main/java/org/candlepin/model/Content.java","position":136,"original_position":136,"commit_id":"9e238c1139c51b6504ab37820dc5006f004132e7","original_commit_id":"9e238c1139c51b6504ab37820dc5006f004132e7","user":{"login":"Ceiu","id":6061522,"avatar_url":"https://avatars.githubusercontent.com/u/6061522?v=3","gravatar_id":"","url":"https://api.github.com/users/Ceiu","html_url":"https://github.com/Ceiu","followers_url":"https://api.github.com/users/Ceiu/followers","following_url":"https://api.github.com/users/Ceiu/following{/other_user}","gists_url":"https://api.github.com/users/Ceiu/gists{/gist_id}","starred_url":"https://api.github.com/users/Ceiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ceiu/subscriptions","organizations_url":"https://api.github.com/users/Ceiu/orgs","repos_url":"https://api.github.com/users/Ceiu/repos","events_url":"https://api.github.com/users/Ceiu/events{/privacy}","received_events_url":"https://api.github.com/users/Ceiu/received_events","type":"User","site_admin":false},"body":"Good catch","created_at":"2016-03-16T19:40:19Z","updated_at":"2016-03-16T19:40:19Z","html_url":"https://github.com/candlepin/candlepin/pull/1134#discussion_r56401077","pull_request_url":"https://api.github.com/repos/candlepin/candlepin/pulls/1134","_links":{"self":{"href":"https://api.github.com/repos/candlepin/candlepin/pulls/comments/56401077"},"html":{"href":"https://github.com/candlepin/candlepin/pull/1134#discussion_r56401077"},"pull_request":{"href":"https://api.github.com/repos/candlepin/candlepin/pulls/1134"}}},"pull_request":{"url":"https://api.github.com/repos/candlepin/candlepin/pulls/1134","id":61733927,"html_url":"https://github.com/candlepin/candlepin/pull/1134","diff_url":"https://github.com/candlepin/candlepin/pull/1134.diff","patch_url":"https://github.com/candlepin/candlepin/pull/1134.patch","issue_url":"https://api.github.com/repos/candlepin/candlepin/issues/1134","number":1134,"state":"open","locked":false,"title":"Added Versioning to Products and Content","user":{"login":"Ceiu","id":6061522,"avatar_url":"https://avatars.githubusercontent.com/u/6061522?v=3","gravatar_id":"","url":"https://api.github.com/users/Ceiu","html_url":"https://github.com/Ceiu","followers_url":"https://api.github.com/users/Ceiu/followers","following_url":"https://api.github.com/users/Ceiu/following{/other_user}","gists_url":"https://api.github.com/users/Ceiu/gists{/gist_id}","starred_url":"https://api.github.com/users/Ceiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ceiu/subscriptions","organizations_url":"https://api.github.com/users/Ceiu/orgs","repos_url":"https://api.github.com/users/Ceiu/repos","events_url":"https://api.github.com/users/Ceiu/events{/privacy}","received_events_url":"https://api.github.com/users/Ceiu/received_events","type":"User","site_admin":false},"body":"Added entity versioning to product and content, allowing the curators to converge identical entities used by multiple orgs and diverge when orgs change their version.\r\n\r\n- Changed all new tables from cpo_* to cp2_*\r\n- Removed the owner column from cp2_products and cp2_content\r\n- Added the new join tables \"cp2_owner_products\" and \"cp2_owner_content\"\r\n- Added collection management utility methods to both Product and Content\r\n  for the new join table\r\n- OwnerProductCurator now reuses owner lookup results when fetching\r\n  products and content\r\n- Content now contains a mapping to its various owners\r\n- Updated lookup queries in the product and content curators\r\n- Removed old migration task files\r\n- Updated Product.equals and Product.hashCode\r\n- Several classes updated to work with the changes to the product curator\r\n  and product\r\n- Removed duplicated code from the product curator and candlepin pool\r\n  manager\r\n- smoke-test.sh renamed to smoke-test.py\r\n- Updated Product.equals to no longer use .equals on any collections\r\n  managed by Hibernate, due to an issue with Hibernate's collections\r\n  not respecting the contract on .equals\r\n- Added four new spec tests for testing product versioning\r\n- ProductCurator no longer generates a UUID for copies of products\r\n  when updating from a shared instance\r\n- product_versioning_spec now contains a test for each version-related\r\n  update and creation case\r\n- Updated content addition and removal to properly update the product\r\n  as it changes\r\n- Deleting a product from one org no longer deletes it from all orgs\r\n- The \"created\" time for a Hibernate entity is no longer updated\r\n  automatically if it has already been set when the object is persisted\r\n- Product collections are no longer copied and duplicated if they are\r\n  already identical\r\n- Added a new utility method, Util.collectionsAreEqual for comparing\r\n  two collections without using their equals method\r\n- Made a few corrections to the hash code and equals calculations\r\n  in Product and Content\r\n- Removed a bunch of dead code in Content, ContentCurator and\r\n  OwnerContentResource\r\n- Content no longer converts null values to empty strings for\r\n  values which are nullable\r\n- ContentCurator and ProductCurator now have a removeContent/Product\r\n  method which wraps all the book keeping associated with versioning\r\n- Content now has a \"locked\" flag, which can be used to prevent API-level\r\n  changes to the content\r\n- Products that are locked no longer allow attaching or removing content\r\n  from them\r\n- Any product or content received from an upstream source -- either\r\n  a manifest or adapter -- will now be locked; preventing it from being\r\n  modified through the API\r\n- Added two new tests to product versioning spec tests and one to\r\n  the content versioning spec tests\r\n- Modified how the VerifyAuthorizationFilter determines the owner\r\n  from the query/arguments\r\n- Product.getHref now attempts to use the Owner from the Resteasy\r\n  context for building the URL. If the context does not have an\r\n  owner, no URL is provided\r\n- Product and Content no longer have an updated_upstream field, instead\r\n  using an entity_version field to store the last known hashcode for a\r\n  given entity. This field is automatically updated whenever either entity\r\n  is persisted or updated.\r\n- ProductCurator and ContentCurator now use the entity version field\r\n  when finding existing versions of a given entity\r\n- CandlepinPoolManager now caches the output of creating or updating\r\n  entities and skips additional lookups when resolving references","created_at":"2016-03-04T16:18:06Z","updated_at":"2016-03-16T19:40:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc6cbe1b303a5694d1a7155dc148535e832fa16f","assignee":{"login":"mstead","id":218800,"avatar_url":"https://avatars.githubusercontent.com/u/218800?v=3","gravatar_id":"","url":"https://api.github.com/users/mstead","html_url":"https://github.com/mstead","followers_url":"https://api.github.com/users/mstead/followers","following_url":"https://api.github.com/users/mstead/following{/other_user}","gists_url":"https://api.github.com/users/mstead/gists{/gist_id}","starred_url":"https://api.github.com/users/mstead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstead/subscriptions","organizations_url":"https://api.github.com/users/mstead/orgs","repos_url":"https://api.github.com/users/mstead/repos","events_url":"https://api.github.com/users/mstead/events{/privacy}","received_events_url":"https://api.github.com/users/mstead/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/candlepin/candlepin/pulls/1134/commits","review_comments_url":"https://api.github.com/repos/candlepin/candlepin/pulls/1134/comments","review_comment_url":"https://api.github.com/repos/candlepin/candlepin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/candlepin/candlepin/issues/1134/comments","statuses_url":"https://api.github.com/repos/candlepin/candlepin/statuses/9e238c1139c51b6504ab37820dc5006f004132e7","head":{"label":"candlepin:crog/perorg_product_versioning","ref":"crog/perorg_product_versioning","sha":"9e238c1139c51b6504ab37820dc5006f004132e7","user":{"login":"candlepin","id":1749632,"avatar_url":"https://avatars.githubusercontent.com/u/1749632?v=3","gravatar_id":"","url":"https://api.github.com/users/candlepin","html_url":"https://github.com/candlepin","followers_url":"https://api.github.com/users/candlepin/followers","following_url":"https://api.github.com/users/candlepin/following{/other_user}","gists_url":"https://api.github.com/users/candlepin/gists{/gist_id}","starred_url":"https://api.github.com/users/candlepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candlepin/subscriptions","organizations_url":"https://api.github.com/users/candlepin/orgs","repos_url":"https://api.github.com/users/candlepin/repos","events_url":"https://api.github.com/users/candlepin/events{/privacy}","received_events_url":"https://api.github.com/users/candlepin/received_events","type":"Organization","site_admin":false},"repo":{"id":4586516,"name":"candlepin","full_name":"candlepin/candlepin","owner":{"login":"candlepin","id":1749632,"avatar_url":"https://avatars.githubusercontent.com/u/1749632?v=3","gravatar_id":"","url":"https://api.github.com/users/candlepin","html_url":"https://github.com/candlepin","followers_url":"https://api.github.com/users/candlepin/followers","following_url":"https://api.github.com/users/candlepin/following{/other_user}","gists_url":"https://api.github.com/users/candlepin/gists{/gist_id}","starred_url":"https://api.github.com/users/candlepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candlepin/subscriptions","organizations_url":"https://api.github.com/users/candlepin/orgs","repos_url":"https://api.github.com/users/candlepin/repos","events_url":"https://api.github.com/users/candlepin/events{/privacy}","received_events_url":"https://api.github.com/users/candlepin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/candlepin/candlepin","description":"The Candlepin entitlement engine","fork":false,"url":"https://api.github.com/repos/candlepin/candlepin","forks_url":"https://api.github.com/repos/candlepin/candlepin/forks","keys_url":"https://api.github.com/repos/candlepin/candlepin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/candlepin/candlepin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/candlepin/candlepin/teams","hooks_url":"https://api.github.com/repos/candlepin/candlepin/hooks","issue_events_url":"https://api.github.com/repos/candlepin/candlepin/issues/events{/number}","events_url":"https://api.github.com/repos/candlepin/candlepin/events","assignees_url":"https://api.github.com/repos/candlepin/candlepin/assignees{/user}","branches_url":"https://api.github.com/repos/candlepin/candlepin/branches{/branch}","tags_url":"https://api.github.com/repos/candlepin/candlepin/tags","blobs_url":"https://api.github.com/repos/candlepin/candlepin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/candlepin/candlepin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/candlepin/candlepin/git/refs{/sha}","trees_url":"https://api.github.com/repos/candlepin/candlepin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/candlepin/candlepin/statuses/{sha}","languages_url":"https://api.github.com/repos/candlepin/candlepin/languages","stargazers_url":"https://api.github.com/repos/candlepin/candlepin/stargazers","contributors_url":"https://api.github.com/repos/candlepin/candlepin/contributors","subscribers_url":"https://api.github.com/repos/candlepin/candlepin/subscribers","subscription_url":"https://api.github.com/repos/candlepin/candlepin/subscription","commits_url":"https://api.github.com/repos/candlepin/candlepin/commits{/sha}","git_commits_url":"https://api.github.com/repos/candlepin/candlepin/git/commits{/sha}","comments_url":"https://api.github.com/repos/candlepin/candlepin/comments{/number}","issue_comment_url":"https://api.github.com/repos/candlepin/candlepin/issues/comments{/number}","contents_url":"https://api.github.com/repos/candlepin/candlepin/contents/{+path}","compare_url":"https://api.github.com/repos/candlepin/candlepin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/candlepin/candlepin/merges","archive_url":"https://api.github.com/repos/candlepin/candlepin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/candlepin/candlepin/downloads","issues_url":"https://api.github.com/repos/candlepin/candlepin/issues{/number}","pulls_url":"https://api.github.com/repos/candlepin/candlepin/pulls{/number}","milestones_url":"https://api.github.com/repos/candlepin/candlepin/milestones{/number}","notifications_url":"https://api.github.com/repos/candlepin/candlepin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/candlepin/candlepin/labels{/name}","releases_url":"https://api.github.com/repos/candlepin/candlepin/releases{/id}","deployments_url":"https://api.github.com/repos/candlepin/candlepin/deployments","created_at":"2012-06-07T14:58:35Z","updated_at":"2016-03-05T15:49:05Z","pushed_at":"2016-03-16T19:25:25Z","git_url":"git://github.com/candlepin/candlepin.git","ssh_url":"git@github.com:candlepin/candlepin.git","clone_url":"https://github.com/candlepin/candlepin.git","svn_url":"https://github.com/candlepin/candlepin","homepage":"http://candlepinproject.org","size":48314,"stargazers_count":34,"watchers_count":34,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":8,"forks":26,"open_issues":8,"watchers":34,"default_branch":"master"}},"base":{"label":"candlepin:master","ref":"master","sha":"2ee3de9f5cee0511808a85aad6fbaf0586d84f48","user":{"login":"candlepin","id":1749632,"avatar_url":"https://avatars.githubusercontent.com/u/1749632?v=3","gravatar_id":"","url":"https://api.github.com/users/candlepin","html_url":"https://github.com/candlepin","followers_url":"https://api.github.com/users/candlepin/followers","following_url":"https://api.github.com/users/candlepin/following{/other_user}","gists_url":"https://api.github.com/users/candlepin/gists{/gist_id}","starred_url":"https://api.github.com/users/candlepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candlepin/subscriptions","organizations_url":"https://api.github.com/users/candlepin/orgs","repos_url":"https://api.github.com/users/candlepin/repos","events_url":"https://api.github.com/users/candlepin/events{/privacy}","received_events_url":"https://api.github.com/users/candlepin/received_events","type":"Organization","site_admin":false},"repo":{"id":4586516,"name":"candlepin","full_name":"candlepin/candlepin","owner":{"login":"candlepin","id":1749632,"avatar_url":"https://avatars.githubusercontent.com/u/1749632?v=3","gravatar_id":"","url":"https://api.github.com/users/candlepin","html_url":"https://github.com/candlepin","followers_url":"https://api.github.com/users/candlepin/followers","following_url":"https://api.github.com/users/candlepin/following{/other_user}","gists_url":"https://api.github.com/users/candlepin/gists{/gist_id}","starred_url":"https://api.github.com/users/candlepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/candlepin/subscriptions","organizations_url":"https://api.github.com/users/candlepin/orgs","repos_url":"https://api.github.com/users/candlepin/repos","events_url":"https://api.github.com/users/candlepin/events{/privacy}","received_events_url":"https://api.github.com/users/candlepin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/candlepin/candlepin","description":"The Candlepin entitlement engine","fork":false,"url":"https://api.github.com/repos/candlepin/candlepin","forks_url":"https://api.github.com/repos/candlepin/candlepin/forks","keys_url":"https://api.github.com/repos/candlepin/candlepin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/candlepin/candlepin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/candlepin/candlepin/teams","hooks_url":"https://api.github.com/repos/candlepin/candlepin/hooks","issue_events_url":"https://api.github.com/repos/candlepin/candlepin/issues/events{/number}","events_url":"https://api.github.com/repos/candlepin/candlepin/events","assignees_url":"https://api.github.com/repos/candlepin/candlepin/assignees{/user}","branches_url":"https://api.github.com/repos/candlepin/candlepin/branches{/branch}","tags_url":"https://api.github.com/repos/candlepin/candlepin/tags","blobs_url":"https://api.github.com/repos/candlepin/candlepin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/candlepin/candlepin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/candlepin/candlepin/git/refs{/sha}","trees_url":"https://api.github.com/repos/candlepin/candlepin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/candlepin/candlepin/statuses/{sha}","languages_url":"https://api.github.com/repos/candlepin/candlepin/languages","stargazers_url":"https://api.github.com/repos/candlepin/candlepin/stargazers","contributors_url":"https://api.github.com/repos/candlepin/candlepin/contributors","subscribers_url":"https://api.github.com/repos/candlepin/candlepin/subscribers","subscription_url":"https://api.github.com/repos/candlepin/candlepin/subscription","commits_url":"https://api.github.com/repos/candlepin/candlepin/commits{/sha}","git_commits_url":"https://api.github.com/repos/candlepin/candlepin/git/commits{/sha}","comments_url":"https://api.github.com/repos/candlepin/candlepin/comments{/number}","issue_comment_url":"https://api.github.com/repos/candlepin/candlepin/issues/comments{/number}","contents_url":"https://api.github.com/repos/candlepin/candlepin/contents/{+path}","compare_url":"https://api.github.com/repos/candlepin/candlepin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/candlepin/candlepin/merges","archive_url":"https://api.github.com/repos/candlepin/candlepin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/candlepin/candlepin/downloads","issues_url":"https://api.github.com/repos/candlepin/candlepin/issues{/number}","pulls_url":"https://api.github.com/repos/candlepin/candlepin/pulls{/number}","milestones_url":"https://api.github.com/repos/candlepin/candlepin/milestones{/number}","notifications_url":"https://api.github.com/repos/candlepin/candlepin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/candlepin/candlepin/labels{/name}","releases_url":"https://api.github.com/repos/candlepin/candlepin/releases{/id}","deployments_url":"https://api.github.com/repos/candlepin/candlepin/deployments","created_at":"2012-06-07T14:58:35Z","updated_at":"2016-03-05T15:49:05Z","pushed_at":"2016-03-16T19:25:25Z","git_url":"git://github.com/candlepin/candlepin.git","ssh_url":"git@github.com:candlepin/candlepin.git","clone_url":"https://github.com/candlepin/candlepin.git","svn_url":"https://github.com/candlepin/candlepin","homepage":"http://candlepinproject.org","size":48314,"stargazers_count":34,"watchers_count":34,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":8,"forks":26,"open_issues":8,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/candlepin/candlepin/pulls/1134"},"html":{"href":"https://github.com/candlepin/candlepin/pull/1134"},"issue":{"href":"https://api.github.com/repos/candlepin/candlepin/issues/1134"},"comments":{"href":"https://api.github.com/repos/candlepin/candlepin/issues/1134/comments"},"review_comments":{"href":"https://api.github.com/repos/candlepin/candlepin/pulls/1134/comments"},"review_comment":{"href":"https://api.github.com/repos/candlepin/candlepin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/candlepin/candlepin/pulls/1134/commits"},"statuses":{"href":"https://api.github.com/repos/candlepin/candlepin/statuses/9e238c1139c51b6504ab37820dc5006f004132e7"}}}}