▲ | VWWHFSfQ 15 hours ago | |||||||
> The presentation also specifically mentioned that using ORM can easily lead to inefficient queries and should be used cautiously. Every ORM is bad. Especially the "any DB" ORMs. Because they trick you into thinking about your data patterns in terms of writing application code, instead of writing code for the database. And most of the time their features and APIs are abstracted in a way that basically means you can only use the least-common-denominator features of all the database backends that they can support. I've sworn off ORMs entirely. My application is a Postgres application first and foremost. I use PG-specific features extensively. Why would I sacrifice all the power that Postgres offers me just for some conveniences in Python, or Ruby, or whatever? Nah. Just write good SQL for your database and the whole system will be very happy. | ||||||||
▲ | bwfan123 13 hours ago | parent | next [-] | |||||||
At one time we had to switch our service out of DB2 into psql. We had to do this with minimum downtime !! ORM helped us since it abstracted the DB (to the orm the sql dialect was a plugin). The application was largely untouched. Also, not all developers can roll their own sqls and sqls embedded in code make it harder to refactor or reason with and eventually sqls will be abstracted into a crud library of sorts anyway. | ||||||||
| ||||||||
▲ | jilles 13 hours ago | parent | prev | next [-] | |||||||
I've been using the Django ORM for years and it feels like an amazing piece of software. But recently I started using sqlc. Which turns my queries into Go (simplification). I think this is actually the sweet spot between ORM and rawdogging SQL. | ||||||||
| ||||||||
▲ | groone 10 hours ago | parent | prev [-] | |||||||
You just never seen a good ORM such as Entity Framework Core |