Advantages of ORM

You would think so and the different Doctrine libraries all do use core parts of Doctrine. However, the idiosyncrasies of the different data stores require quite a bit of dedicated code/ logic and thus, they are their own projects and also end up with their own “way of doing mappings”. So, after working a bit with MongoDB ODM, I’d venture to say, the “hiding of implementation details” wasn’t successful at all.

But the building of SQL isn’t a “normal” ORM activity really. At least it shouldn’t be. It is just a tool at your disposal, when the normal ORM API doesn’t cover the right bases. I’d say 80-90% of objects and their relationships can be handled well with the mappings. The rest need specialized queries and thus you have access to DBAL through the entity manager and the query builder.

Scott