9 Commits

Author SHA1 Message Date
Alex Gaynor
56dc22d64c [1.2.X] Fixed a suite of errors in the ORM -- a) fixed calling values_list().values_list() and changing whether the results are flat, b) fixed an issue with fields on the left-hand side of what becomes the HAVING clause not being included in the GROUP BY clause, and c) fixed a bug with fields from values() calls not being included in the GROUP BY clause. This fixed the recent test failures under postgresql. Backport of [14715].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-26 14:28:27 +00:00
Alex Gaynor
478a4e22ad [1.2.X] Added a test for using an __in lookup with a ValueListQueryset from a none() call. Refs #14622. Backport of [14568].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 02:36:00 +00:00
Ramiro Morales
6a369d2ff3 [1.2.X] Fixed errors introduced in r14280 when running Django tests under Python < 2.6.
Backport of [14287] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 19:42:36 +00:00
Ramiro Morales
9bcdb620cb [1.2.X] Converted queries tests from doctests to unittests.
Thanks Russell and Alex for reviews and suggestions.

Backport of [14279] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14280 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 04:17:29 +00:00
Alex Gaynor
b3e02d19ec [1.2.X] Fixed #14011 -- Doing a subquery with __in and an EmptyQuerySet no longer raises an Exception. This is actually just a test for this, it was fixed by [14085]. Thanks to skatei for the report and mk for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 16:51:50 +00:00
Alex Gaynor
bb66cb8463 [1.2.X] Fixed #14366 -- Model.objects.none().values() now correctly returns a QuerySet with no items, rather than raising an Exception. Thanks to Carl Meyer for the patch. Backport of [14084].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14085 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 16:46:25 +00:00
Russell Keith-Magee
e93f56b174 Fixed #13227 -- Ensure that the query cache is flushed when a QuerySet is deepcopied, avoiding problems when an evaluated queryset is used as a subquery. Thanks to claudep for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-13 15:18:10 +00:00
Russell Keith-Magee
82efb48403 Fixed #12328 -- Corrected the handling of subqueries with ordering and slicing, especially when used in delete subqueries. Thanks to Walter Doekes for the report.
This fixes a feature that isn't available under MySQL and Oracle (Refs #10099).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12912 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-04 17:05:43 +00:00
Jacob Kaplan-Moss
c00e8d2064 Added a QuerySet.ordered property to check if a queryset is already ordered. Refs #10163.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-22 22:16:19 +00:00