Thursday 17 December 2009

Composition for happy ORM?

None of the polymorphic mapping strategies for ORM seem to work very well.
  • Table per class hierarchy - Is too evil to mention.
  • Table per class - Very similar to composition?
  • Table per concrete class - Makes queries and FKs painful.
Composition seems to map nicely to relational databases. Also in the real world composition can model the world nicely.