Re:ORM is an anti-pattern
by smharris65 on Saturday September 17, 2011 @09:46AM
(#3007989)
Good point. Maybe you have to choose a tool that allows you to discard it if you find a better tool once the problem becomes clearer. So, the question is: are ORMs easy to "unplug" if you need to use a better tool?
[ Parent
| on HN ]
The problem with unplugging the ORM or inter operating is that the 2 biggest ORM frameworks are implemented such that they don't support composite primary keys and have stupid requirements like having an auto increment column called "id" on every table (including tables used as part of a many to many relationship!!).
As far as I know Doctrine 2.0 absolves a lot of these problems but I've not used it yet.
If the requirements change outside of the scope of the ORM you can always write SQL to do the query or guide the ORM.
If the requirement change requires a different backend using an ORM is actually easier, faster and less error prone.
So yes.