{"action":"created","comment":{"url":"https://api.github.com/repos/yahoo/elide/pulls/comments/141680529","pull_request_review_id":65932366,"id":141680529,"diff_hunk":"@@ -1375,11 +1416,20 @@ protected Object getValueUnchecked(String fieldName) {\n     protected boolean addToCollection(Collection collection, String collectionName, PersistentResource toAdd) {\n         final Collection singleton = Collections.singleton(toAdd.getObject());\n         final Collection original = copyCollection(collection);\n-        checkFieldAwareDeferPermissions(\n-                UpdatePermission.class,\n-                collectionName,\n-                CollectionUtils.union(CollectionUtils.emptyIfNull(collection), singleton),\n-                original);\n+        if (isNewlyCreated()) {\n+            checkFieldAwareDeferPermissions(\n+                    CreatePermission.class,\n+                    collectionName,\n+                    CollectionUtils.union(CollectionUtils.emptyIfNull(collection), singleton),","path":"elide-core/src/main/java/com/yahoo/elide/core/PersistentResource.java","position":136,"original_position":136,"commit_id":"b114e0109c440dbefcafcb3d5e2ce1fafb837438","original_commit_id":"b114e0109c440dbefcafcb3d5e2ce1fafb837438","user":{"login":"clayreimann","id":930039,"avatar_url":"https://avatars3.githubusercontent.com/u/930039?v=4","gravatar_id":"","url":"https://api.github.com/users/clayreimann","html_url":"https://github.com/clayreimann","followers_url":"https://api.github.com/users/clayreimann/followers","following_url":"https://api.github.com/users/clayreimann/following{/other_user}","gists_url":"https://api.github.com/users/clayreimann/gists{/gist_id}","starred_url":"https://api.github.com/users/clayreimann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clayreimann/subscriptions","organizations_url":"https://api.github.com/users/clayreimann/orgs","repos_url":"https://api.github.com/users/clayreimann/repos","events_url":"https://api.github.com/users/clayreimann/events{/privacy}","received_events_url":"https://api.github.com/users/clayreimann/received_events","type":"User","site_admin":false},"body":"Again, can we compute this once for both cases?","created_at":"2017-09-28T17:14:15Z","updated_at":"2017-09-28T17:14:43Z","html_url":"https://github.com/yahoo/elide/pull/544#discussion_r141680529","pull_request_url":"https://api.github.com/repos/yahoo/elide/pulls/544","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/yahoo/elide/pulls/comments/141680529"},"html":{"href":"https://github.com/yahoo/elide/pull/544#discussion_r141680529"},"pull_request":{"href":"https://api.github.com/repos/yahoo/elide/pulls/544"}}},"pull_request":{"url":"https://api.github.com/repos/yahoo/elide/pulls/544","id":143240114,"html_url":"https://github.com/yahoo/elide/pull/544","diff_url":"https://github.com/yahoo/elide/pull/544.diff","patch_url":"https://github.com/yahoo/elide/pull/544.patch","issue_url":"https://api.github.com/repos/yahoo/elide/issues/544","number":544,"state":"open","locked":false,"title":"Use CreatePermission to set field on newly created resources","user":{"login":"suriyasundar92","id":14365156,"avatar_url":"https://avatars3.githubusercontent.com/u/14365156?v=4","gravatar_id":"","url":"https://api.github.com/users/suriyasundar92","html_url":"https://github.com/suriyasundar92","followers_url":"https://api.github.com/users/suriyasundar92/followers","following_url":"https://api.github.com/users/suriyasundar92/following{/other_user}","gists_url":"https://api.github.com/users/suriyasundar92/gists{/gist_id}","starred_url":"https://api.github.com/users/suriyasundar92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suriyasundar92/subscriptions","organizations_url":"https://api.github.com/users/suriyasundar92/orgs","repos_url":"https://api.github.com/users/suriyasundar92/repos","events_url":"https://api.github.com/users/suriyasundar92/events{/privacy}","received_events_url":"https://api.github.com/users/suriyasundar92/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-26T20:51:32Z","updated_at":"2017-09-28T17:14:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e19b3fad36b6278b0907075043c101b6132b4771","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/yahoo/elide/pulls/544/commits","review_comments_url":"https://api.github.com/repos/yahoo/elide/pulls/544/comments","review_comment_url":"https://api.github.com/repos/yahoo/elide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yahoo/elide/issues/544/comments","statuses_url":"https://api.github.com/repos/yahoo/elide/statuses/b114e0109c440dbefcafcb3d5e2ce1fafb837438","head":{"label":"yahoo:incomplete-changes-for-adding-createpermission-on-attributes","ref":"incomplete-changes-for-adding-createpermission-on-attributes","sha":"b114e0109c440dbefcafcb3d5e2ce1fafb837438","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":44124366,"name":"elide","full_name":"yahoo/elide","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/elide","description":"Elide is a Java library that lets you stand up a JSON API web service with minimal effort","fork":false,"url":"https://api.github.com/repos/yahoo/elide","forks_url":"https://api.github.com/repos/yahoo/elide/forks","keys_url":"https://api.github.com/repos/yahoo/elide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/elide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/elide/teams","hooks_url":"https://api.github.com/repos/yahoo/elide/hooks","issue_events_url":"https://api.github.com/repos/yahoo/elide/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/elide/events","assignees_url":"https://api.github.com/repos/yahoo/elide/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/elide/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/elide/tags","blobs_url":"https://api.github.com/repos/yahoo/elide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/elide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/elide/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/elide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/elide/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/elide/languages","stargazers_url":"https://api.github.com/repos/yahoo/elide/stargazers","contributors_url":"https://api.github.com/repos/yahoo/elide/contributors","subscribers_url":"https://api.github.com/repos/yahoo/elide/subscribers","subscription_url":"https://api.github.com/repos/yahoo/elide/subscription","commits_url":"https://api.github.com/repos/yahoo/elide/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/elide/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/elide/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/elide/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/elide/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/elide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/elide/merges","archive_url":"https://api.github.com/repos/yahoo/elide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/elide/downloads","issues_url":"https://api.github.com/repos/yahoo/elide/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/elide/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/elide/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/elide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/elide/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/elide/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/elide/deployments","created_at":"2015-10-12T17:55:01Z","updated_at":"2017-09-27T15:52:51Z","pushed_at":"2017-09-28T17:01:37Z","git_url":"git://github.com/yahoo/elide.git","ssh_url":"git@github.com:yahoo/elide.git","clone_url":"https://github.com/yahoo/elide.git","svn_url":"https://github.com/yahoo/elide","homepage":"http://elide.io/","size":4461,"stargazers_count":231,"watchers_count":231,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":52,"forks":67,"open_issues":52,"watchers":231,"default_branch":"master"}},"base":{"label":"yahoo:elide-4.x","ref":"elide-4.x","sha":"140c2d49733b2c7fe0144437e802b8cd95e869a2","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":44124366,"name":"elide","full_name":"yahoo/elide","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/elide","description":"Elide is a Java library that lets you stand up a JSON API web service with minimal effort","fork":false,"url":"https://api.github.com/repos/yahoo/elide","forks_url":"https://api.github.com/repos/yahoo/elide/forks","keys_url":"https://api.github.com/repos/yahoo/elide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/elide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/elide/teams","hooks_url":"https://api.github.com/repos/yahoo/elide/hooks","issue_events_url":"https://api.github.com/repos/yahoo/elide/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/elide/events","assignees_url":"https://api.github.com/repos/yahoo/elide/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/elide/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/elide/tags","blobs_url":"https://api.github.com/repos/yahoo/elide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/elide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/elide/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/elide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/elide/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/elide/languages","stargazers_url":"https://api.github.com/repos/yahoo/elide/stargazers","contributors_url":"https://api.github.com/repos/yahoo/elide/contributors","subscribers_url":"https://api.github.com/repos/yahoo/elide/subscribers","subscription_url":"https://api.github.com/repos/yahoo/elide/subscription","commits_url":"https://api.github.com/repos/yahoo/elide/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/elide/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/elide/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/elide/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/elide/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/elide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/elide/merges","archive_url":"https://api.github.com/repos/yahoo/elide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/elide/downloads","issues_url":"https://api.github.com/repos/yahoo/elide/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/elide/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/elide/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/elide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/elide/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/elide/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/elide/deployments","created_at":"2015-10-12T17:55:01Z","updated_at":"2017-09-27T15:52:51Z","pushed_at":"2017-09-28T17:01:37Z","git_url":"git://github.com/yahoo/elide.git","ssh_url":"git@github.com:yahoo/elide.git","clone_url":"https://github.com/yahoo/elide.git","svn_url":"https://github.com/yahoo/elide","homepage":"http://elide.io/","size":4461,"stargazers_count":231,"watchers_count":231,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":52,"forks":67,"open_issues":52,"watchers":231,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yahoo/elide/pulls/544"},"html":{"href":"https://github.com/yahoo/elide/pull/544"},"issue":{"href":"https://api.github.com/repos/yahoo/elide/issues/544"},"comments":{"href":"https://api.github.com/repos/yahoo/elide/issues/544/comments"},"review_comments":{"href":"https://api.github.com/repos/yahoo/elide/pulls/544/comments"},"review_comment":{"href":"https://api.github.com/repos/yahoo/elide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yahoo/elide/pulls/544/commits"},"statuses":{"href":"https://api.github.com/repos/yahoo/elide/statuses/b114e0109c440dbefcafcb3d5e2ce1fafb837438"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"clayreimann"}}