<feed xmlns='http://www.w3.org/2005/Atom'>
<title>django.git/django/db/models/sql/query.py, branch 1.5c1</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/django.git/atom?h=1.5c1</id>
<link rel='self' href='http://cgit.adnoto.dev/django.git/atom?h=1.5c1'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/'/>
<updated>2012-11-28T16:25:34Z</updated>
<entry>
<title>[1.5.x] Fixed #14694 -- Made ``defer()`` work with reverse relations</title>
<updated>2012-11-28T16:25:34Z</updated>
<author>
<name>Tai Lee</name>
<email>tai.lee@3030.com.au</email>
</author>
<published>2012-11-28T16:16:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a21e8dee7682abdba646c5b72b6371d392e44dd1'/>
<id>urn:sha1:a21e8dee7682abdba646c5b72b6371d392e44dd1</id>
<content type='text'>
Reverse o2o fields are now usable with defer.

Backpatch of [6ebf115206289bce8f3d86318871faac13d6e835]
</content>
</entry>
<entry>
<title>[1.5.x] Fixed #18375 -- Removed dict-ordering dependency for F-expressions</title>
<updated>2012-11-23T18:07:50Z</updated>
<author>
<name>Anssi Kääriäinen</name>
<email>akaariai@gmail.com</email>
</author>
<published>2012-11-22T18:27:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=90c7aa074095311862b71f3b4ee7220369785375'/>
<id>urn:sha1:90c7aa074095311862b71f3b4ee7220369785375</id>
<content type='text'>
F() expressions reuse joins like any lookup in a .filter() call -
reuse multijoins generated in the same .filter() call else generate
new joins. Also, lookups can now reuse joins generated by F().

This change is backwards incompatible, but it is required to prevent
dict randomization from generating different queries depending on
.filter() kwarg ordering. The new way is also more consistent in how
joins are reused.

Backpatch of 90b86291d022a09031d1df397d7aaebc30e435f7
</content>
</entry>
<entry>
<title>Removed use of SortedDict for query.alias_refcount</title>
<updated>2012-11-13T21:01:34Z</updated>
<author>
<name>Anssi Kääriäinen</name>
<email>akaariai@gmail.com</email>
</author>
<published>2012-11-10T23:59:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=fe21c233d44a5cafff0766eb17ed3df20e08b70f'/>
<id>urn:sha1:fe21c233d44a5cafff0766eb17ed3df20e08b70f</id>
<content type='text'>
This will have a smallish impact on performance. Refs #19276.
</content>
</entry>
<entry>
<title>Fixed regression caused by #19102</title>
<updated>2012-10-25T16:13:10Z</updated>
<author>
<name>Anssi Kääriäinen</name>
<email>akaariai@gmail.com</email>
</author>
<published>2012-10-25T16:13:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=bd6d9ea87cfa252c2992904897e137bc23da56c3'/>
<id>urn:sha1:bd6d9ea87cfa252c2992904897e137bc23da56c3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #19102 -- Fixed fast-path delete for modified SELECT clause cases</title>
<updated>2012-10-25T14:16:44Z</updated>
<author>
<name>Anssi Kääriäinen</name>
<email>akaariai@gmail.com</email>
</author>
<published>2012-10-10T12:58:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=f64a5ef404cb6fd28e008a01039a3beea2fa8e1b'/>
<id>urn:sha1:f64a5ef404cb6fd28e008a01039a3beea2fa8e1b</id>
<content type='text'>
There was a bug introduced in #18676 which caused fast-path deletes
implemented as "DELETE WHERE pk IN &lt;subquery&gt;" to fail if the SELECT
clause contained additional stuff (for example extra() and annotate()).

Thanks to Trac alias pressureman for spotting this regression.
</content>
</entry>
<entry>
<title>Fixed #19087 -- Ensured query's base table is never LOUTER joined</title>
<updated>2012-10-08T15:40:09Z</updated>
<author>
<name>Anssi Kääriäinen</name>
<email>akaariai@gmail.com</email>
</author>
<published>2012-10-08T15:36:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a62d53c03252bdf82b21b64874efe053160cbdb7'/>
<id>urn:sha1:a62d53c03252bdf82b21b64874efe053160cbdb7</id>
<content type='text'>
This fixes a regression created by join promotion logic refactoring:
01b9c3d5193fe61b82ae8b26242a13fdec22f211

Thanks to Ivan Virabyan for the report.
</content>
</entry>
<entry>
<title>Internal refactoring; moving LOOKUP_SEP up one level.</title>
<updated>2012-09-08T23:51:36Z</updated>
<author>
<name>Malcolm Tredinnick</name>
<email>malcolm.tredinnick@gmail.com</email>
</author>
<published>2012-09-08T23:51:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=c4aa26a983c91b1ec015fe0552077847116dfab7'/>
<id>urn:sha1:c4aa26a983c91b1ec015fe0552077847116dfab7</id>
<content type='text'>
In an ideal world, nothing except django.db.models.query should have to
import stuff from django.models.sql.*. A few things were needing to get
hold of sql.constants.LOOKUP_SEP, so this commit moves it up to
django.db.models.constants.LOOKUP_SEP.

There are still a couple of places (admin) poking into sql.* to get
QUERY_TERMS, which is unfortunate, but a slightly different issue and
harder to adjust.
</content>
</entry>
<entry>
<title>Cleaned up some small bits of the ORM, including removing an import *.</title>
<updated>2012-09-07T14:58:17Z</updated>
<author>
<name>Alex Gaynor</name>
<email>alex.gaynor@rd.io</email>
</author>
<published>2012-09-07T14:58:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=0e296131bb9c94b9bedee34c2a30774107d1d899'/>
<id>urn:sha1:0e296131bb9c94b9bedee34c2a30774107d1d899</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #16715 -- Fixed join promotion logic for nested nullable FKs</title>
<updated>2012-08-25T11:14:45Z</updated>
<author>
<name>Anssi Kääriäinen</name>
<email>akaariai@gmail.com</email>
</author>
<published>2012-08-21T18:54:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=01b9c3d5193fe61b82ae8b26242a13fdec22f211'/>
<id>urn:sha1:01b9c3d5193fe61b82ae8b26242a13fdec22f211</id>
<content type='text'>
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]-&gt; B -[nonnull]-&gt; C

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

The major change taken in this patch is that now if we promote a join
A-&gt;B, we will automatically promote joins B-&gt;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 -&gt; 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.
</content>
</entry>
<entry>
<title>Fixed #17886 -- Fixed join promotion in ORed nullable queries</title>
<updated>2012-08-21T18:23:57Z</updated>
<author>
<name>Anssi Kääriäinen</name>
<email>akaariai@gmail.com</email>
</author>
<published>2012-08-21T15:43:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/django.git/commit/?id=a193372753ad9d1d15ad5e2d6d06bbc07ca3f433'/>
<id>urn:sha1:a193372753ad9d1d15ad5e2d6d06bbc07ca3f433</id>
<content type='text'>
The ORM generated a query with INNER JOIN instead of LEFT OUTER JOIN
in a somewhat complicated case. The main issue was that there was a
chain of nullable FK -&gt; non-nullble FK, and the join promotion logic
didn't see the need to promote the non-nullable FK even if the
previous nullable FK was already promoted to LOUTER JOIN. This resulted
in a query like a LOUTER b INNER c, which incorrectly prunes results.
</content>
</entry>
</feed>
