2 ms·
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 T
by megaman821 14y ago
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.
- lucian1900 14y agoThere 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.