pouchdb-community / ember-pouch

PouchDB/CouchDB adapter for Ember Data
Apache License 2.0
281 stars 76 forks source link

Add support for fetching non-saved hasMany relationships #259

Open adezegher opened 4 years ago

adezegher commented 4 years ago

When creating a hasMany - hasMany relationship it is possible to only save one side of the relation, to reduce the risk of merge conflict.

However, the current implementation, only loads the unsaved side for a hasMany - belongsTo relationship, but not for a hasMany - hasMany relationship.

This change, allows to load the unsaved side in a hasMany - hasMany relationship, in a similar way hasMany - belongsTo does

broerse commented 4 years ago

Not sure this is the way to go. It will not work without setting save: true on one side in your Ember model. If you later want to do this the other way around you are in for a challenge. We should solve this in a more constant way. What if App1 from team 1 has the save: true defined on the other side then App2 from team 2?