|
|
|
|
|
by poshmosh
957 days ago
|
|
I feel like the majority of the people who complain about orms, haven't taken the time to learn the orm. Often times, there is a DSL you need to learn, but for simple database relations and joins not using an ORM is a waste of time and resources. orms are often opinionated and tables that are setup with an ORM may not be compatible with other ORMS. This is the only real downside. If you have a large legacy application that needs to be migrated to a new framework that uses different conventions for index names, table names, ect, then you are in for a bad time. Django's orm is probably one of the best out there. Django also has orm manager classes you can extend with abstractions around orm functions or raw queries. For complex queries, like with CTE's, complex joins, recrusive queries, index optimizations, there is no way around custom queries but any good ORM has an api around these raw queries that can hopefully also map to objects in your applications. |
|
My personal experience is that the more they try to abstract away raw queries, the least useful they are. YMMV