ORMs help less a) the more the complexity or constraints of the work increase and b) the more the ORM insists on One Right Way to approach relational DBs. Dev time is probably required to overcome the ORM in such cases. 2/4
Comments
Log in with your Bluesky account to leave a comment
On balance and in general, I think their benefits usually outweigh their negatives, at least with recent vintage ORMs. But DB work of any substance can get tricky, and ORMs can’t fix that. 3/4
I guess I’m feeling this topic because yesterday my ORM forced me to use SQL instead of its nifty ORM-ness. Not sure if it was the problem or if the problem was me, but I couldn’t make it reference a CTE in place of an ORM entity. (Which is stupid easy in SQL)
Comments
*sigh* ORMs
4/4
There are actually cases where a raw SQL query can be more secure than an ORM, depending on the ORM's syntax: https://www.nodejs-security.com/blog/raw-sql-queries-better-for-security-than-orms