Comment

Comment by Fire-Dragon-DoL

I keep thinking that the query portion should be entirely split from the ORM portion. Query builder have specific usage, but are not the norm. None of them can model an advanced postgres query, but at the same time, they provide little (or nothing) utilities to map the data coming from a complex query, back to objects, which is funny, to me that would be the definition of "object relational mapper".

I know why activerecord does this: it's way easier to do the join in memory, so that one row is obtained per object and not an enormous row representing many, but not providing any utility for raw queries seems a big missing feature.

Edit: to be clear, by query I refer to read operations (select) that are not trivial (find one by id would be trivial)

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton