Factory for polymorphic association