ebryn/ember-model — pull request #90 by drogus (2013-06-26 13:20:24+00:00)
Title: [WIP] Relationship improvements

I'm working on improving relationships, specifically working on non-embedded `hasMany` and then I would also like to add `belongsTo`. As usual, I'm posting early to get feedback.

The work includes breaking changes at the moment, I've changed `hasMany` to be non-embedded by default. Mainly because this is also the default in ED and also `embedded: true` is probably more readable than the opposite (I'm not sure if there's a good word, `nonEmbedded: true` seems bad). I could also check if `embedded` attribute is passed in options and use embedded version if it's not there, so you would have to pass `embedded: false` for non embedded relationships, but it seems worse than the current version.

TODO:

- [ ] add `getHasMany()` and `getBelongsTo` hooks, which will work similarly to `getAttr`
- [ ] adding a record to `HasManyArray` should add its id to parent