{"action":"created","issue":{"url":"https://api.github.com/repos/projecthydra-labs/hydra-pcdm/issues/89","labels_url":"https://api.github.com/repos/projecthydra-labs/hydra-pcdm/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/projecthydra-labs/hydra-pcdm/issues/89/comments","events_url":"https://api.github.com/repos/projecthydra-labs/hydra-pcdm/issues/89/events","html_url":"https://github.com/projecthydra-labs/hydra-pcdm/issues/89","id":76109209,"number":89,"title":"change type specific getters to return AssociationProxy","user":{"login":"elrayle","id":6855473,"avatar_url":"https://avatars.githubusercontent.com/u/6855473?v=3","gravatar_id":"","url":"https://api.github.com/users/elrayle","html_url":"https://github.com/elrayle","followers_url":"https://api.github.com/users/elrayle/followers","following_url":"https://api.github.com/users/elrayle/following{/other_user}","gists_url":"https://api.github.com/users/elrayle/gists{/gist_id}","starred_url":"https://api.github.com/users/elrayle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elrayle/subscriptions","organizations_url":"https://api.github.com/users/elrayle/orgs","repos_url":"https://api.github.com/users/elrayle/repos","events_url":"https://api.github.com/users/elrayle/events{/privacy}","received_events_url":"https://api.github.com/users/elrayle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-05-13T20:15:44Z","updated_at":"2015-05-18T02:03:08Z","closed_at":null,"body":"Modify type specific setters to return AssociationProxy which reponds to #=, #==, #<<, etc\r\n\r\nExample change for Collection...\r\n```\r\nAssociationProxy.new(self, :collections)\r\n```\r\n\r\nAlso remove the companion setter methods.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/projecthydra-labs/hydra-pcdm/issues/comments/102890927","html_url":"https://github.com/projecthydra-labs/hydra-pcdm/issues/89#issuecomment-102890927","issue_url":"https://api.github.com/repos/projecthydra-labs/hydra-pcdm/issues/89","id":102890927,"user":{"login":"elrayle","id":6855473,"avatar_url":"https://avatars.githubusercontent.com/u/6855473?v=3","gravatar_id":"","url":"https://api.github.com/users/elrayle","html_url":"https://github.com/elrayle","followers_url":"https://api.github.com/users/elrayle/followers","following_url":"https://api.github.com/users/elrayle/following{/other_user}","gists_url":"https://api.github.com/users/elrayle/gists{/gist_id}","starred_url":"https://api.github.com/users/elrayle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elrayle/subscriptions","organizations_url":"https://api.github.com/users/elrayle/orgs","repos_url":"https://api.github.com/users/elrayle/repos","events_url":"https://api.github.com/users/elrayle/events{/privacy}","received_events_url":"https://api.github.com/users/elrayle/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T02:03:08Z","updated_at":"2015-05-18T02:03:08Z","body":"While implementing remove related objects services, errors occurred due to the fact that related_objects returns the AssociationProxy.  GetRelatedObjectsFromCollection/Object were updated to return an array to make their behavior consistent with that for collections and objects.  With services for basic CRUD, what unique benefits does passing the AssociationProxy to apps have that outways the separation of low level model implementation from higher level processing.  Passing AssociationProxy will make code maintenance more difficult when changes are made to the lowest persistence level.  One of the purposes of the PCDM and Hydra:Works gems should be to handle low level translations.  If next year, we use something other than AssociationProxies, the code that has to change are the services.  The apps that use the services should have no, or at least minimal, changes required."}}