Relationship implementation and polymorphism