Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm a former Oracle DBA and I love the Django ORM. After you learn it, it does almost anything I want, and when I want custom SQL I just write custom SQL.

Learning it well is important though, and inspecting the SQL that was generated for your test cases after you've implemented a feature is also important.

It can do multiple joins with same table when needed, it can do filtered prefetch, it can do subqueries, it can do exists(), it can do group by, it lets you use SQL functions Django doesn't know about out of the box, etc.

But I think the documentation is not intuitive, and in the complex cases the ORM code looks complicated and I think I prefer writing SQL in that case because there is greater chance that the next developer will know SQL than that of them knowing advanced Django ORM features. Also, more chance of getting stack-overflow help for SQL.



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

Search: