That's one thing I like about Rail's ActiveRecord: it covers the most common queries with its own DSL, but also makes it easy to insert snippets of plain SQL while still returning ActiveRecord models.
The mapping part is definitely the part of an ORM I like the most. I like both (although unrelated from my understanding) sqlx for Go and sqlx for Rust, which both handle the mapping problem given raw SQL.
Re:You might not need an ORM
by antipotoad on Wednesday January 25, 2023 @10:53AM
(#34519765)
I’m inclined to agree. The article brushes over the type-safety provided by Prisma as being merely a ‘useful feature’ — but this is huge, especially working on a large project with lots of other developers. The discipline imposed by strict types is indispensable to my mind, how ever much I agree with the author that writing SQL directly feels good.
I also like the idea of using plain SQL and do all the additional manual work myself (that's what I do in personal projects): I like the feeling that I'm in control. When it comes to professional work, that's a recipe for disaster and ORMs bring consistency to the table.