Anyways, as for the way you're handling relationships:
The RESTAdapter works like it does because it expects hasMany<->belongsTo relationships. In that relationship:
- It can load the child record from an array of IDs on the parent.
- When a child record is updated, it is saved back to the server without including the parent.
- When a child record is added, it only saves itself back to the server. The server is expected to handle adding that record to the parent resource.
- Similarly, when a child record is deleted, it is saved back to the server and the server should remove it from the parent resource.
Essentially, the client shouldn't need to save the list of children back to the server.
The downside of this is that this doesn't actually work in a hasMany<->hasMany relationship, because a record in that relationship does need to send back the list of resources - it's the same as the way a belongsTo record will include its parent.
Regardless, there's no obvious harm in overriding RESTAdapter to do this, and it shouldn't impact the way that a regular hasMany<->belongsTo relationship is handled. Just make sure that the client-side records always have a current representation of their relationships, or you might end up saving back incorrect versions of the records.
What's Ember? Do you mean Ember.js?
OP: Nice post. I've actually spent the last few days on the very same topic. I had the same problem with MongoDB's _id and everything I found on Google seemed to show different approach, from which none worked. Ultimately I changed to Parse and everything worked out of the box.
Basically just link the JS and add your API keys.