{"action":"created","issue":{"url":"https://api.github.com/repos/neos/flow-development-collection/issues/112","repository_url":"https://api.github.com/repos/neos/flow-development-collection","labels_url":"https://api.github.com/repos/neos/flow-development-collection/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/neos/flow-development-collection/issues/112/comments","events_url":"https://api.github.com/repos/neos/flow-development-collection/issues/112/events","html_url":"https://github.com/neos/flow-development-collection/pull/112","id":113837376,"number":112,"title":"FEATURE: Make ObjectAccess use add/remove methods on collection types","user":{"login":"albe","id":4259532,"avatar_url":"https://avatars.githubusercontent.com/u/4259532?v=3","gravatar_id":"","url":"https://api.github.com/users/albe","html_url":"https://github.com/albe","followers_url":"https://api.github.com/users/albe/followers","following_url":"https://api.github.com/users/albe/following{/other_user}","gists_url":"https://api.github.com/users/albe/gists{/gist_id}","starred_url":"https://api.github.com/users/albe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albe/subscriptions","organizations_url":"https://api.github.com/users/albe/orgs","repos_url":"https://api.github.com/users/albe/repos","events_url":"https://api.github.com/users/albe/events{/privacy}","received_events_url":"https://api.github.com/users/albe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neos/flow-development-collection/labels/P:%20Flow","name":"P: Flow","color":"0052cc"},{"url":"https://api.github.com/repos/neos/flow-development-collection/labels/T:%20PHP","name":"T: PHP","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-10-28T14:44:34Z","updated_at":"2016-04-01T09:21:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neos/flow-development-collection/pulls/112","html_url":"https://github.com/neos/flow-development-collection/pull/112","diff_url":"https://github.com/neos/flow-development-collection/pull/112.diff","patch_url":"https://github.com/neos/flow-development-collection/pull/112.patch"},"body":"This change will make ObjectAccess use dedicated add*/remove* methods on all collection type\r\nproperties if available, instead of always depending on setting the whole collection property\r\nat once.\r\n\r\nThis is necessary for following use cases:\r\n- you want to add/remove items on the inverse side of a doctrine relation (i.e. the \"one\" side of a OneToMany relation)\r\n- you want to remove items from a collection via web form and have special handling code in the remove* method\r\n- you want to track entity changes by logging accesses to add/remove methods\r\n- you have special domain rules for a collection property that are enforced per single item removal/addition\r\n- you want to prevent other models from completely overwriting a collection property on your entity (no need for set* collection setter)\r\n\r\nThis will allow a more clean domain modelling with clear change rules on collection properties\r\nand enforce those rules within property mapping and your domain model.\r\n\r\nFLOW-366 #close"},"comment":{"url":"https://api.github.com/repos/neos/flow-development-collection/issues/comments/204325140","html_url":"https://github.com/neos/flow-development-collection/pull/112#issuecomment-204325140","issue_url":"https://api.github.com/repos/neos/flow-development-collection/issues/112","id":204325140,"user":{"login":"albe","id":4259532,"avatar_url":"https://avatars.githubusercontent.com/u/4259532?v=3","gravatar_id":"","url":"https://api.github.com/users/albe","html_url":"https://github.com/albe","followers_url":"https://api.github.com/users/albe/followers","following_url":"https://api.github.com/users/albe/following{/other_user}","gists_url":"https://api.github.com/users/albe/gists{/gist_id}","starred_url":"https://api.github.com/users/albe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albe/subscriptions","organizations_url":"https://api.github.com/users/albe/orgs","repos_url":"https://api.github.com/users/albe/repos","events_url":"https://api.github.com/users/albe/events{/privacy}","received_events_url":"https://api.github.com/users/albe/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T09:21:31Z","updated_at":"2016-04-01T09:21:31Z","body":"Never taking your feedback personal, so no worries :) In the end, I even rather have destructive feedback than no feedback at all\r\n\r\nRegarding duplication: I just thought that there would be some code from ObjectAccess needed to be copied to the ObjectConverter, but after thinking again I guess that was an overestimation.\r\n\r\nI'll move this to the Converter and push a follow up, hopefully today."}}