{"action":"opened","issue":{"url":"https://api.github.com/repos/Volicon/backbone.nestedTypes/issues/101","labels_url":"https://api.github.com/repos/Volicon/backbone.nestedTypes/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/Volicon/backbone.nestedTypes/issues/101/comments","events_url":"https://api.github.com/repos/Volicon/backbone.nestedTypes/issues/101/events","html_url":"https://github.com/Volicon/backbone.nestedTypes/issues/101","id":109327920,"number":101,"title":"Support for multiple stores","user":{"login":"gaperton","id":469462,"avatar_url":"https://avatars.githubusercontent.com/u/469462?v=3","gravatar_id":"","url":"https://api.github.com/users/gaperton","html_url":"https://github.com/gaperton","followers_url":"https://api.github.com/users/gaperton/followers","following_url":"https://api.github.com/users/gaperton/following{/other_user}","gists_url":"https://api.github.com/users/gaperton/gists{/gist_id}","starred_url":"https://api.github.com/users/gaperton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaperton/subscriptions","organizations_url":"https://api.github.com/users/gaperton/orgs","repos_url":"https://api.github.com/users/gaperton/repos","events_url":"https://api.github.com/users/gaperton/events{/privacy}","received_events_url":"https://api.github.com/users/gaperton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-01T15:47:58Z","updated_at":"2015-10-01T15:47:58Z","closed_at":null,"body":"Currently, we can have id refs to the members of the same model.\r\n```\r\nitems : Collection,\r\nitem : Model.from( 'items' )\r\n```\r\n\r\nHowever, there's no way to cross-reference objects from different collection without using globals.\r\n\r\nIn order to implement it, we need to add notion of aggregation to the nested model, i.e. nested model should reference parent model in the same way as model in collection reference its collection.\r\n\r\nAlso, we need to think about aggregation semantic on assignments. There should be only one owner of nested model. Should we deep copy objects (no), throw exceptions (may be), just silently ignore (with console warning).\r\n\r\nThis semantic can potentially affect nested changes detection. Sometimes in viewmodels we use shared objects for synchronization, however, it introduce a mess on attempt of saving the UI state. It shouldn't be the problem with react though, in case we will implement change event's grouping for collections (separate ticket)."}}