| Age | Commit message (Collapse) | Author |
|
This ensures all database identifiers are quoted independently of their orign
and most importantly that user provided aliases through annotate() and alias()
which paves the way for dropping the allow list of characters such aliases can
contain.
This will require adjustments to raw SQL interfaces such as RawSQL that might
make reference to ORM managed annotations as these will now be quoted.
The `SQLCompiler.quote_name_unless_alias` method is kept for now as an alias
for the newly introduced `.quote_name` method but will be duly deprecated in
a follow up commit.
|
|
|
|
contain periods.
This prevents failures at the database layer, given that aliases in the
ON clause are not quoted.
Systematically quoting aliases even in FilteredRelation is tracked in
https://code.djangoproject.com/ticket/36795.
|
|
|
|
|
|
FilteredRelation.
|
|
Regression in 59f475470494ce5b8cbff816b1e5dafcbd10a3a3.
|
|
Thanks Mark Zorn for the report.
Regression in 59f475470494ce5b8cbff816b1e5dafcbd10a3a3.
|
|
Thanks zhu for the report and Simon Charette for reviews.
|
|
test_condition_with_func_and_lookup_outside_relation_name().
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
|
|
of relation name.
|
|
The previous implementation resolved condition at Join compilation time
which required introducing a specialized expression resolving mode to
alter the join reuse logic solely during that phase.
FilteredRelation.condition is now resolved when the relation is first
referenced which maintains the existing behavior while allowing the
removal of the specialized resolving mode and address an issue where
conditions couldn't spawn new joins.
|
|
assertQuerySetEqual().
Co-Authored-By: Michael Howitz <mh@gocept.com>
|
|
It accounts for differences seen on MySQL with MyISAM storage engine.
|
|
argument from Query methods."
Thanks lind-marcus for the report.
This reverts commit 0c71e0f9cfa714a22297ad31dd5613ee548db379.
Regression in 0c71e0f9cfa714a22297ad31dd5613ee548db379.
|
|
|
|
|
|
|
|
Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
|
|
|
|
implemented comparisons.
Changed __eq__ to return NotImplemented instead of False if compared to
an object of the same type, as is recommended by the Python data model
reference. Now these models can be compared to ANY (or other objects
with __eq__ overwritten) without returning False automatically.
|
|
Using annotated FilteredRelations raised a FieldError when coupled with
exclude(). This is due to not passing filtered relation fields to the
subquery created in split_exclude(). We fixed this issue by passing the
filtered relation data to the newly created subquery.
Secondly, in the case where an INNER JOIN is used in the excluded
subquery, the ORM would trim the filtered relation INNER JOIN in attempt
to simplify the query. This will also remove the ON clause filters
generated by the FilteredRelation. We added logic to not trim the INNER
JOIN if it is from FilteredRelation.
|
|
empty result.
|
|
Thanks Adam Chidlow for polishing the patch.
|
|
support.
Thanks Anssi Kääriäinen for contributing to the patch.
|