The type of a polymorphic belongsTo is serialized properly.

[Fixes #881]