4 ms·
> I do raw SQL queries instead of ORM Love it. I've seen so many cases where engineers with just basic SQL knowledge (like myself; I'm no JOIN god) can run cir
by ericbarrett 3y ago
> I do raw SQL queries instead of ORM
Love it. I've seen so many cases where engineers with just basic SQL knowledge (like myself; I'm no JOIN god) can run circles around the queries ORMs generate.
- brazzy 3y agoORMs are great to spare you from writing heaps of error-prone boilerplate mapping code. Which is kinda what they are for, that's why they're called "Object-Relational Mappers". Not "Object-Relational Query Generators". Because they suck at the latter.
- klysm 3y agoUsually they’re not even really relational mappers, but table mappers.
- throwaway744678 3y agoNot sure what you mean: (in a rdms) a table is a relation.
- klysm 3y agoYes exactly. ORMs are usually only good at representing tables, not general relations.
- deleted 3y ago[deleted]
- stolsvik 3y agoORMs help you the first three weeks. After that it is a lead ball around both feets, dragging you down into dark pits of bad performance, incomprehensible relations, and impossible debugging. That anyone with more than 6 months of experience still drag Hibernate up from their chest is just absolutely beyond my comprehension.
- marginalia_nu 3y agoI think if you're doing basic CRUD operations on small tables with relatively simple relations, then ORM is just fine. This is to be blunt what a lot of applications do, and so a lot of them justifiably use ORM. That said, the moment you leave the small table simple relations space (by e.g. having a table with a quarter billion rows), then ORM is not a good choice.