django1/django/db/models
Anssi Kääriäinen 01b9c3d519 Fixed #16715 -- Fixed join promotion logic for nested nullable FKs
The joins for nested nullable foreign keys were often created as INNER
when they should have been OUTER joins. The reason was that only the
first join in the chain was promoted correctly. There were also issues
with select_related etc.

The basic structure for this problem was:
  A -[nullable]-> B -[nonnull]-> C

And the basic problem was that the A->B join was correctly LOUTER,
the B->C join not.

The major change taken in this patch is that now if we promote a join
A->B, we will automatically promote joins B->X for all X in the query.
Also, we now make sure there aren't ever join chains like:
   a LOUTER b INNER c
If the a -> b needs to be LOUTER, then the INNER at the end of the
chain will cancel the LOUTER join and we have a broken query.

Sebastian reported this problem and did also major portions of the
patch.
2012-08-25 14:14:45 +03:00
..
fields [py3] Removed a remaining use of __metaclass__. 2012-08-14 23:45:12 +02:00
sql Fixed #16715 -- Fixed join promotion logic for nested nullable FKs 2012-08-25 14:14:45 +03:00
__init__.py Remove some code that has been dead since newforms-admin was merged, many moons ago. 2012-07-12 09:27:08 -07:00
aggregates.py Fixed #1142 -- Added multiple database support. 2009-12-22 15:18:51 +00:00
base.py Revert "Fixed #18063 -- Avoid unicode in Model.__repr__ in python 2" 2012-08-22 11:48:47 +10:00
deletion.py remove a bunch of unnescesarry iterkeys() calls 2012-08-08 07:33:15 -07:00
expressions.py [py3] Fixed F-expression right-hand division 2012-08-15 13:28:47 +02:00
loading.py [py3] Fixed access to dict keys/values/items. 2012-08-07 12:00:22 +02:00
manager.py Fixed #16937 - added `QuerySet.prefetch_related` to prefetch many related objects. 2011-10-05 23:14:52 +00:00
options.py [py3] Replace filter/lambda by list comprehensions 2012-08-14 14:31:06 +02:00
query.py Cleaned up the implementation of in_bulk 2012-08-24 16:08:16 -07:00
query_utils.py [py3] Fixed access to dict keys/values/items. 2012-08-07 12:00:22 +02:00
related.py [py3] Ported django.utils.encoding. 2012-08-07 12:00:22 +02:00
signals.py Fixed #4102 -- Allow update of specific fields in model.save() 2012-05-12 10:29:41 +03:00