inaes-tic/mbc-common — pull request #50 by pardo-bsso (2014-01-24 13:26:26+00:00)
Title: models jump to other collections. Stateful views review

This is needed to avoid erroneous updates as we instantiate various Piece.Collection, one for every Playlist.

Each one of them is initialized with the set of pieces that belong to the playlist. Up to that point everything so far works.

However when we add a new piece the backend broadcasts a 'create' event and every Piece.Collection reacts to it, and so the piece ends up everywhere.

Adding this reverseRelation (and includeInJSON: '_id') avoids that