1
0
mirror of https://github.com/django/django.git synced 2024-12-27 03:25:58 +00:00
django/tests/regressiontests/aggregation_regress
Anssi Kääriäinen 69597e5bcc Fixed #10790 -- Refactored sql.Query.setup_joins()
This is a rather large refactoring. The "lookup traversal" code was
splitted out from the setup_joins. There is now names_to_path() method
which does the lookup traveling, the actual work of setup_joins() is
calling names_to_path() and then adding the joins found into the query.

As a side effect it was possible to remove the "process_extra"
functionality used by genric relations. This never worked for left
joins. Now the extra restriction is appended directly to the join
condition instead of the where clause.

To generate the extra condition we need to have the join field
available in the compiler. This has the side-effect that we need more
ugly code in Query.__getstate__ and __setstate__ as Field objects
aren't pickleable.

The join trimming code got a big change - now we trim all direct joins
and never trim reverse joins. This also fixes the problem in #10790
which was join trimming in null filter cases.
2012-12-16 17:23:26 +02:00
..
fixtures Renamed the fixtures used by the aggregation tests so they're only loaded by the tests that use them. Refs #17275. 2011-11-27 10:31:26 +00:00
__init__.py Fixed #3566 -- Added support for aggregation to the ORM. See the documentation for details on usage. 2009-01-15 11:06:34 +00:00
models.py [py3] Refactored __unicode__ to __str__. 2012-08-12 14:44:40 +02:00
tests.py Fixed #10790 -- Refactored sql.Query.setup_joins() 2012-12-16 17:23:26 +02:00