Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not an antipattern and it will never be. Like many solutions there are scenarios in which using an ORM is the simplest thing to do.

Also there are many different implementations of ORMs each with different features (Martin Fowler has a list from his Patterns of Enterprise Application Architecture: https://www.martinfowler.com/eaaCatalog/index.html). For example in the JVM world, jOOQ and Hibernate provide very different solutions.

* jOOQ provides a table data gateway (when used without records)

* Hibernate: unit of Work, Lazy load, multiple inheritance strategies, Query object, Versioning, lifecycle events, and much more. Lot of the grief about Hibernate comes mainly from people who never bothered RTFM.

Having said the above, if one needs flexibility and high performance (with complex queries), using vanilla SQL is invariably the best way.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: