handle polymorphic relations