Fix polymorphic relationship serialization