emberjs/data — pull request #1564 by tricknotes (2013-12-09 16:56:33+00:00)
Title: Support embedded ids

I supported embedded object serialization not only objects but also *ids*.

Usage:

When there are model definitions:
```js
App.Post = DS.Model.extend({
title: DS.attr(),
categories: DS.hasMany('category')
});

App.Category = DS.Model.extend({
});
```

`{embedded: 'ids'}` behave like the followings:

```js
App.PostSerializer = DS.ActiveModelSerializer.extend(DS.EmbeddedRecordsMixin, {
attrs: {
categories: {embedded: 'ids'}
}
});

post.serialize();
//=> {title: "My blog", category_ids: [1, 2]}
```

Some case, embedded objects may be enough only ids.