3 ms·
I understand the point of the article; it's something db developers have been doing for years. However, I couldn't ignore the following bit about ORMs ... [th
by mzarate06 15y ago
I understand the point of the article; it's something db developers have been doing for years. However, I couldn't ignore the following bit about ORMs ...
[they're] often removing the need to 'hand write' SQL for anything but the most complex of query.
I've found that to be false, and that continues to be one reason why I'm against ORM. For example, the use of unions and aggregates pretty common, yet the ORMs I've used don't support these things, or at least not w/out having to fall back to handwritten queries at some point, which only supplements my point.
I get ORMs, I use them when needed, I'm not entirely religious about being against them. If the article wants to declare using them as standard practice, ok. However, I'd find it more accurate if "removing the need to 'hand write' SQL for anything but the most complex of query" was reworded to "removing the need to 'hand write' only the simplest of queries."
- lwcd 15y agoValid point, not all ORMs are created equal. Django's allows complex queries to be constructed via their Q objects that can traverse relationships without trouble. In comparison, the in-house one I am currently provides almost no abstraction on top of sql. Striking the right balance between the two is obviously not trivial and can be a matter of preference.