backbone icon indicating copy to clipboard operation
backbone copied to clipboard

Question about organising model instances shared between collections

Open gregerolsson opened this issue 15 years ago • 1 comments

We're just getting started with Backbone and were wondering a little about organizing models that may be contained in several collections. Are you guys doing any kind of management of model instances in the client to make sure a particular "server model" (ID=123) is not represented by more than exactly one Backbone.Model instance in the client regardless of how many collections it is fetched to? I mean, I guess that fetching /projects/1/tickets and /users/1/tickets into 2 collections may have some shared Ticket models and ideally there would only be one Ticket model instance with ID=123 in memory so that a single update to it would be reflected in all views.

I guess it can be solved in many ways, just wondering if we're thinking about it the right way.

Thanks!

gregerolsson avatar Jan 26 '11 18:01 gregerolsson

Sorry for the noise, I discovered that Issue 190 actually discusses this.

gregerolsson avatar Jan 26 '11 19:01 gregerolsson