Hey Tim!

I'm AFK right now, but do you have a test case handy I can add to reveal that problem?

Sent from my iPhone

> On Dec 23, 2013, at 21:27, Tim Stirrat <notifications@github.com> wrote:
> 
> In packages/activemodel-adapter/lib/system/embedded_records_mixin.js:
> 
> > +
> > +    @method serializeBelongsTo
> > +    @param {DS.Model} record
> > +    @param {Object} json
> > +    @param relationship
> > +  */
> > +  serializeBelongsTo: function(record, json, relationship) {
> > +    var attr = relationship.key, config = this.get('attrs');
> > +
> > +    if (!config || !isEmbedded(config[attr])) {
> > +      this._super(record, json, relationship);
> > +      return;
> > +    }
> > +    var key = this.keyForAttribute(attr);
> > +    var embeddedRecord = record.get(attr);
> > +    json[key] = embeddedRecord.serialize();
> Need a null check here or it fails when there is no related item: Cannot call method 'serialize' of null
> 
> —
> Reply to this email directly or view it on GitHub.