How to include associations when saving with ActiveModelAdapter

I’ve found lots of bits and pieces to do with how to serialize associations when saving with the ActiveModelAdapter but nothing seems to work.

The most promising looking approach was to simply specify embedded:‘always’ as an option on the association e.g.

var attr = DS.attr;
var belongsTo = DS.belongsTo;

Zapnito.Archive = DS.Model.extend({
	video: belongsTo('video', {embedded:'always'}),
	durationSeconds: attr('number'),
	url: attr('string')


var attr = DS.attr;
var belongsTo = DS.belongsTo;

Zapnito.Video = DS.Model.extend({
	title: attr('string'),
	introduction: attr('string'),
	archive: belongsTo('archive', {embedded:'always'})

but when I try save an archive for instance there’s just a video_id rather than the expected video_attributes property. Is what I’m trying to do possible with the ActiveModelAdapter?

I’ve opened a pull request to add a guide for this,

have you tried this? EmbeddedRecordsMixin - 4.6 - Ember API Documentation

I think you need to use that mixin.