At Dinamis, we've put to good use several ORM's in various worlds.
Personally, one thing I find is that they are not fully object oriented. There is an atmosphere in the community around these ORMs that seem to relegate Object orientation to Inheritance. Sure, inheritance is important ... but how much ?
What I believe is fundamentally more important in an ORM and which is sadly missing, is the idea that objects are entities and that they have relationships.
First, I describe the Foreign Key, which I believe is too low-level for an object world.
The problem is that a single relational concept, the Foreign Key (or FK) represents too many things.
In object orientation, there are a few patterns all of which are represented by FK:
- one-to-one and one-to-many
- unidirectional vs bidirectional
- Aggregation vs association
- inheritance (in some designs)
The FK is not the only culprit.
We have to recognize, that fundamentally, the ORM is not merely a way to hiding SQL and string escapes (which has saved us quite a few keystrokes at Dinamis). It also represents a fundamental shift to an Object-oriented model for data. In essence, an ORM is a platform for reasoning over our schema.
The Django ORM uses this to good measure: it provides a runtime picture of the data model as it stands. Django auto-generates an entire admin interface ... among other things.
I believe that the lack of a fully object oriented ORM is a detriment to further growth in this area.
Further, I believe that Object-oriented designs involving object composition, rather than inheritance are more powerful a tool, and much more possible in the short term.
I will develop these ideas further in a forthcoming paper.