Author: mtredinnick Date: 2009-01-07 23:15:41 -0600 (Wed, 07 Jan 2009) New Revision: 9714
Modified: django/trunk/django/db/models/sql/query.py Log: Remove any ordering from a nested select query (in the where-clause). This fixes r9701 for Oracle (the test introduced there did its job and failed previously). Modified: django/trunk/django/db/models/sql/query.py =================================================================== --- django/trunk/django/db/models/sql/query.py 2009-01-08 05:12:14 UTC (rev 9713) +++ django/trunk/django/db/models/sql/query.py 2009-01-08 05:15:41 UTC (rev 9714) @@ -317,11 +317,13 @@ """ Perform the same functionality as the as_sql() method, returning an SQL string and parameters. However, the alias prefixes are bumped - beforehand (in a copy -- the current query isn't changed). + beforehand (in a copy -- the current query isn't changed) and any + ordering is removed. Used when nesting this query inside another. """ obj = self.clone() + obj.clear_ordering(True) obj.bump_prefix() return obj.as_sql() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---