3 ms·
But why? Although I have way more experience with Django ORM, I find that SQLAlchemy is closer to SQL and I have to think less how to express complex queries. W
by anticodon 1y ago
But why? Although I have way more experience with Django ORM, I find that SQLAlchemy is closer to SQL and I have to think less how to express complex queries. With Django ORM changing a few characters can change resulting query from LEFT JOIN to INNER JOIN, for example. I find it more difficult to write complex queries in Django ORM.
- izacus 1y agoBeing closer to SQL in my projects meant that it had more footguns than C++ and developers had to know a lot about DB details to not break things.
- bbkane 1y agoI don't think it's unreasonable that devs should have to learn about database details to correctly use a database. Could you list some specific examples where things broke because of SQLAlchemy's design?
- izacus 1y agoManaging connections, connection looking and transactions was something that was always an issue with SQLalchemy for us. Migrations were significantly more terrible as well.
- lelanthran 1y agoThe only footgun is pretending that using an ORM means not having to learn SQL.
- sgarland 1y agoWait until you find out that the RDBMS optimizer may also sometimes convert your outer joins to inner joins. I dislike all ORMs, but I especially dislike SQLAlchemy for its hideously bad docs.