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

That is not true it is just that the syntax is non-obvious and awkward in my mind.

You can do stuff like Teacher.objects.all().select_related('students') and Teacher.objects.filter(students__first_name='Jill').

The biggest frustration is aggregation though. It has hard and sometimes impossible to add group by and having clauses. Using extra() is very fragile and using values to force the group by is awkward. There is probably no fixing that part of the Django ORM other than just getting rid of it.



There are still joins that are not expressible through its syntax, like outer joins between several unrelated models.

I've been pondering implementing a Django ORM backend that just delegates to the relevant SQLAlchemy functions. I think it may be way harder than it seems, though.




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

Search: