Hacker News new | past | comments | ask | show | jobs | submit login

I don’t mind query builders. They help you fall into the pit of success and reuse useful queries. The thing I don’t like about ORMs is how you get back a graph of objects, and you can mutate any of them and call `.save()` on any of them. They pretend to be a live representation of what‘s in the database, but they are a proxy. And so when saving, the ORM has to sync the alterations you made to your objects with what it believes is in the database. It treats database tables as just a bag of attributes.

I prefer to work with values and be explicit about what’s been read and what needs updating. If you need optimistic concurrency control be explicit about that too.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: