News for hackers. Stuff that matters.
Re:DenoDB by supermatt on Friday June 18, 2021 @05:08AM (#27548635)
Sounds like all your gripes are from a naive usage of ORMs.

Rails ActiveRecord, for example, handles ALL your mentioned scenarios (includes, joins, select, Transaction.do, update_all - and you can still run SQL queries or fragments thereof).

Theres a lot more in the docs than you will see in "toy examples".

Of course, not all ORMs are created equally...

Re:DenoDB by OJFord on Friday June 18, 2021 @05:19AM (#27548690)
Not GP, and I've never used Rails so I'm not fanboying over it, but I've long had the impression that ActiveRecord is at least one of the most sophisticated ORMs; it wouldn't surprise me if it handles more complex cases better than others.

I think my preferred style (vs. full ORM or raw SQL) is that of Diesel (which is incidentally from a (former?) maintainer of ActiveRecord, Sean Griffin, though I think he may have since stepped back from it) for Rust - it's more like 'SQL bindings' than 'ORM's typically are or grow to be; so you pretty much write SQL, just in Rust syntax with type checking etc. instead of actual SQL in one big Rust string.

Re:DenoDB by nine_k on Friday June 18, 2021 @11:10PM (#27557389)
Indeed, I have seen a lot of semi-naive usage of ORMs, and enough expert usage that sidesteps the leaking abstractions and drops into non-ORM access.

Table models are hugely useful. "Business object" models, not as much.

Re:DenoDB by ttfkam on Friday June 18, 2021 @11:43PM (#27557550)
All uses of any technology are naive given enough members on a team.