Django's ORM-layer revamped

Malcolm Tredinnick today merged his queryset-refactor branch into Django’s trunk, which means everyone using trunk will finally be able to for example using a more sane syntax for ordering resultsets (no table names anymore), update multiple objects with just one query, tell select_related() which fields it should follow (instead of every foreign key it comes across) and much much more.


Part of this branch is also an implementation for model inheritance which finally adds this long awaited feature to Django.

While the public interface for the ORM-layer should stay the same, the internals have undergone massive change. So if you’re relying on some private part of the API, you will have to check if it still works. Affected of this if for example the popular django-tagging app (guess what it does ;-)) which in its current state (r132) uses the no longer available django.db.models.query.parse_lookup function. A patch by Joes Watts is available here and seems to solve this issue. For more details check out this ticket on django-tagging’s google code project page.

Anyway, congratulations and big thanks to Malcolm Tredinnick for his work on this. I can’t wait for the next branch to get merged with trunk ;-)