| Age | Commit message (Collapse) | Author |
|
through model.
Backport of ee596888e1149864e7828f5cf63c0eda395744c3 from master
|
|
QuerySet.values() on Oracle.
Backport of ed1bcf05158acf4bf4e0189d477b6c762bd0133e from master
|
|
QuerySet.values().
Backport of 69b69f6d6085d80ccf36a3e999e9e5b98d580786 from master
|
|
crashing on MySQL.
Thanks to Trac aliases gerricom for the report, raphaelmerx for the
attempts to reproduce and Sergey Fedoseev and Tim for the review.
Refs #16891
Backport of 8035cee92293f3319919c8248c7787ba43c05917 from master
|
|
Backport of 32ef48aa562e6aaee9983f5d0f1c60f02fd555fb from master
|
|
|
|
|
|
|
|
Thanks Anssi Kääriäinen for providing the solution.
|
|
Thanks Marcin Biernat for the initial patch and tests.
|
|
|
|
foreign/primary key.
Thanks Anssi Kääriäinen for help.
|
|
|
|
|
|
|
|
|
|
Thanks Josh Smeaton for help on the tests.
|
|
|
|
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.
|
|
Partial forwardport of 469f1e362bb9670b174b37da9edd4631aff7badb from stable/1.8.x
as the issue was already fixed in master.
|
|
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.
|
|
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.
|
|
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).
|
|
object filters.
|
|
Thanks to Elmar Bucher for the report and Tim for the review.
|
|
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.
|
|
|
|
|
|
|
|
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().
|
|
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.
|
|
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
|
|
|
|
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
|
|
|