| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
lookup error.
|
|
|
|
|
|
|
|
|
|
| |
nested non-relational fields.
The removed test was added in the original select_related() validation
patch (45d4e43d2d25b902e3821b612209afa951a8bcb8), but there doesn't
seem to be any reason for it.
Thanks Claude Paroz for help and review.
|
|
|
|
|
|
| |
old-style aggregates.
Per deprecation timeline.
|
| |
|
|
|
|
| |
SQLInsertCompiler
|
| |
|
| |
|
|
|
|
|
|
| |
queries.
Thanks Anssi Kääriäinen for providing the solution.
|
|
|
|
|
|
| |
and an empty QuerySet.
Thanks Marcin Biernat for the initial patch and tests.
|
| |
|
|
|
|
|
|
| |
involving a foreign/primary key.
Thanks Anssi Kääriäinen for help.
|
|
|
|
| |
DISTINCT queries.
|
| |
|
| |
|
|
|
|
| |
value.
|
|
|
|
| |
Thanks Josh Smeaton for help on the tests.
|
|
|
|
| |
in order_by()
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the pk was a relation field, qs.filter(pk__in=qs) didn't work.
In addition, fixed Restaurant.objects.filter(place=restaurant_instance),
where place is an OneToOneField and the primary key of Restaurant.
A big thank you to Josh for review and to Tim for review and cosmetic
edits.
Thanks to Beauhurst for commissioning the work on this ticket.
|
| |
|
|
|
|
|
| |
Forwardport of ae1d663b7913f6da233c55409c4973248372d302
from stable/1.8.x plus more.
|
|
|
|
|
|
|
| |
expressions with exclude()."
Partial forwardport of 469f1e362bb9670b174b37da9edd4631aff7badb from stable/1.8.x
as the issue was already fixed in master.
|
|
|
|
|
|
|
|
| |
annotation with Count()
QuerySet.exists() incorrectly handled query.group_by = True
case (grouping by all select fields), causing GROUP BY
expressions to be wiped along with select fields.
|
|
|
|
| |
number of deleted objects.
|
|
|
|
| |
Avoided split_exclude() for Q when used as an expression.
|
|
|
|
|
| |
This mirrors convert_xxxfield_value nicely, taking advantage of the
adapter/converter terminology which is commonly used by DB-API modules.
|
|
|
|
|
|
|
|
|
|
| |
Refs #23820.
Fixed #19738.
Refs #17755. In order not to introduce a regression for raw queries,
parameters are passed through the connection.ops.value_to_db_* methods,
depending on their type.
|
|
|
|
|
|
|
|
|
| |
some queries
When the query's model had a self-referential foreign key, the
compiler.get_group_by() code incorrectly used the self-referential
foreign key's column (for example parent_id) as GROUP BY clause
when it should have used the model's primary key column (id).
|
|
|
|
| |
as queryset related object filters.
|
|
|
|
|
|
| |
detection on columns.
Thanks to Elmar Bucher for the report and Tim for the review.
|
|
|
|
|
|
|
| |
subquery.
Thanks to charettes and priidukull for investigating the issue, and to
kurevin for the report.
|
|
|
|
|
|
|
|
| |
Fixed queries where an expression was used in order_by() but the
expression wasn't in the query's select clause (for example the
expression could be masked by .values() call)
Thanks to Trac alias MattBlack85 for the report.
|
|
|
|
| |
QuerySet filtering
|
|
|
|
| |
pk object.
|
|
|
|
| |
support.
|
|
|
|
|
|
|
|
| |
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously related fields didn't implement get_lookup, instead
related fields were treated specially. This commit removed some of
the special handling. In particular, related fields return Lookup
instances now, too.
Other notable changes in this commit is removal of support for
annotations in names_to_path().
|
|
|
|
|
|
|
|
|
|
|
| |
query and expressions
The query used a construct of qs.annotate().values().aggregate() where
the first annotate used an F-object reference and the values() and
aggregate() calls referenced that F-object.
Also made sure the inner query's select clause is as simple as possible,
and made sure .values().distinct().aggreate() works correctly.
|
|
|
|
|
|
| |
As suggested by Anssi. This has the slightly strange side effect of
passing the expression to Expression.convert_value has the expression
passed back to it, but it allows more complex patterns of expressions.
|
|
|
|
|
|
| |
foreign keys.
Joint effort between myself, Josh, Anssi and Shai.
|
| |
|
| |
|
|
|
|
|
| |
At the same time, made sure that empty nodes in where clause match
everything.
|
|
|
|
|
|
|
| |
Instead of splitting filter clauses to where and having parts before
adding them to query.where or query.having, add all filter clauses to
query.where, and when compiling the query split the where to having and
where parts.
|
|
|
|
| |
This function is unused since 6fe2b001dba45134d7c10729c57959995e241a88
|
|
|
|
|
| |
This method was inadvertently reintroduced in
f59fd15c4928caf3dfcbd50f6ab47be409a43b01
|
| |
|
|
|
|
|
|
| |
ValuesListQuerySet().
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
|
|
|
|
| |
test failure.
|
|
|
|
| |
expressions
|