pathable/supermodel — pull request #31 by kevinmarx (2013-04-26 15:17:04+00:00)
Title: Re-add the model.collection association for the models in the all collection after fetch

On a collection reset, the collection association would be removed from the models in the `all` collection. Then if the fetched models matched those in the `all` collection we would pull the models from there rather than running through the default initialize. This was causing the collection association to never be reset on those models.

So if model.collection already exists on the models in the `all` collection we don't reset it otherwise we set it to `options.collection` if that exists.

My use case for this is I load a list of items, the user can then apply filters to that list which calls `collection.fetch({reset: true})`, the models returned will match models stored in the `all` collection but their collection associations have been removed by the collection reset.