{"action":"closed","issue":{"url":"https://api.github.com/repos/projecthydra/active_fedora/issues/1008","repository_url":"https://api.github.com/repos/projecthydra/active_fedora","labels_url":"https://api.github.com/repos/projecthydra/active_fedora/issues/1008/labels{/name}","comments_url":"https://api.github.com/repos/projecthydra/active_fedora/issues/1008/comments","events_url":"https://api.github.com/repos/projecthydra/active_fedora/issues/1008/events","html_url":"https://github.com/projecthydra/active_fedora/issues/1008","id":140809943,"number":1008,"title":"has_many for a new owner is returning all the orphan records","user":{"login":"jcoyne","id":92044,"avatar_url":"https://avatars.githubusercontent.com/u/92044?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoyne","html_url":"https://github.com/jcoyne","followers_url":"https://api.github.com/users/jcoyne/followers","following_url":"https://api.github.com/users/jcoyne/following{/other_user}","gists_url":"https://api.github.com/users/jcoyne/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoyne/subscriptions","organizations_url":"https://api.github.com/users/jcoyne/orgs","repos_url":"https://api.github.com/users/jcoyne/repos","events_url":"https://api.github.com/users/jcoyne/events{/privacy}","received_events_url":"https://api.github.com/users/jcoyne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/projecthydra/active_fedora/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"jcoyne","id":92044,"avatar_url":"https://avatars.githubusercontent.com/u/92044?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoyne","html_url":"https://github.com/jcoyne","followers_url":"https://api.github.com/users/jcoyne/followers","following_url":"https://api.github.com/users/jcoyne/following{/other_user}","gists_url":"https://api.github.com/users/jcoyne/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoyne/subscriptions","organizations_url":"https://api.github.com/users/jcoyne/orgs","repos_url":"https://api.github.com/users/jcoyne/repos","events_url":"https://api.github.com/users/jcoyne/events{/privacy}","received_events_url":"https://api.github.com/users/jcoyne/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-03-14T22:01:58Z","updated_at":"2016-03-19T00:01:21Z","closed_at":"2016-03-19T00:01:21Z","body":"Because it's searching for all the objects that don't have an assertion, rather than just returning an empty set:\r\n\r\nhttps://github.com/projecthydra/active_fedora/blob/master/lib/active_fedora/associations/has_many_association.rb#L20\r\n\r\n```ruby\r\ns.permissions.proxy_association.send :construct_query\r\n\"-accessTo_ssim:[* TO *] AND _query_:\\\"{!raw f=has_model_ssim}Hydra::AccessControls::Permission\\\"\"\r\n```"}}