News for hackers. Stuff that matters.
Re:Full Time by ericbarrett on Friday June 16, 2023 @02:21PM (#36361309)
> 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.

Re:Full Time by brazzy on Friday June 16, 2023 @05:32PM (#36364203)
ORMs 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.

Re:Full Time by klysm on Friday June 16, 2023 @05:48PM (#36364384)
Usually they’re not even really relational mappers, but table mappers.
Re:Full Time by throwaway744678 on Friday June 16, 2023 @06:35PM (#36364875)
Not sure what you mean: (in a rdms) a table is a relation.
Re:Full Time by klysm on Saturday June 17, 2023 @02:00AM (#36367700)
Yes exactly. ORMs are usually only good at representing tables, not general relations.
Re:Full Time by skrtskrt on Friday June 16, 2023 @08:58PM (#36366035)
the most basic thing that drives me crazy is that standard ORM usage means usually load every single column on every query. Even if all your joins and filters are fines, it’s just too much going over the wite and then being parsed
Re:Full Time by stolsvik on Saturday June 17, 2023 @01:59PM (#36372644)
ORMs 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.

Re:Full Time by marginalia_nu on Sunday June 18, 2023 @04:54AM (#36378454)
I 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.