Fix polymorphic belongsTo serialization

Type key must come from the model object, not from the relationship name.