News for hackers. Stuff that matters.
Re:Objection to ORM Hatred by keithalewis on Monday January 16, 2023 @02:19AM (#34397842)
Are there any examples of ORMs that have been used for over 10 years that people don't hate?
Re:Objection to ORM Hatred by graypegg on Monday January 16, 2023 @02:31AM (#34397908)
Rails activerecord? It’s got it’s quirks, but I feel like it’s pretty boring and predictable to use, in a good way!
Re:Objection to ORM Hatred by mo_po2 on Monday January 16, 2023 @02:31AM (#34397907)
DjangoORM
Re:Objection to ORM Hatred by alkonaut on Monday January 16, 2023 @02:44AM (#34397985)
Dapper https://github.com/DapperLib/Dapper/

Granted, it doesn't do everything (it just does what it needs to not be hated). I used it because it does the boring error-prone bits of manual SQL but not much else.

Re:Objection to ORM Hatred by thom on Monday January 16, 2023 @03:23AM (#34398245)
I never hated Hibernate. It gave me huge amounts of power and flexibility, outs to use raw SQL or even stored procedures when necessary, and was extensible enough that I could even map to legacy schemas that were basically insane.
Re:Objection to ORM Hatred by thunderbong on Monday January 16, 2023 @08:35AM (#34400455)
Re:Objection to ORM Hatred by plant-ian on Monday January 16, 2023 @12:47PM (#34403339)
SQLAlchemy: "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL."

  - connection pooling, multiple drivers
  - core layer (can use to build sql without orm, describe table metadata, output ddl, etc.)
  - orm layer (automatic class to table mapping, relationships, configurable relationship loading strategies, easy ad-hoc optimization of loading objects, write custom SQL to load objects, load relationships from subqueries, etc.)
  - db reflection
  - db inspection
  - migrations (via alembic)
  - now supports async drivers
  - 2.0 coming out soon with more consistent interfaces
Pretty much does almost everything or provides a compatible way for you to do it yourself. I think most people complaining about ORMs just haven't used this one. You still have to know SQL.

edited: formatting