emberjs/data — pull request #1917 by Tiwalun (2014-05-05 20:04:24+00:00)
Title: Allow belongs to associations to be saved when the associated object is null

I was getting the following error message when trying to save a model with a polymorphic belongs to association when the associated object is null:

TypeError: belongsTo is null

I have added a check to serializePolymorphicType to set the type to null if there is no model associated.