| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
more consistent.
This also adds _add_base(), _clear_base(), and _remove_base() internal
hooks.
|
|
Clarified that the nulls_distinct argument is not supported, as opposed
to certain values for the argument.
Thanks Russell Owen for the report.
|
|
explicit grouping.
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
values in Value.
Previously, only strings were supplied with an output_field when wrapping
direct value iterable elements in Value expressions for ExpressionList. This
caused problems for __in lookups on JSONField when using expressions
alongside direct values, as JSONField values can have different types which
need to be adapted by the field's get_db_prep_value().
Refs #36689.
Thanks Jacob Walls for the review.
|
|
|
|
Oracle.
Added a JSONIn lookup to handle correct serialization and extraction
for JSONField top-level __in queries on backends without native JSON
support. KeyTransformIn now subclasses JSONIn.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Thanks Jacob Walls for the report and review.
|
|
get_db_prep_save.
The validation in validate_autopk_value is specific to saving. Having it in
get_db_prep_value caused Value(0, AutoField()) to fail unexpectedly when used
in a filter on MySQL.
Thanks Jacob Walls for the review.
|
|
This is also applicable on CockroachDB.
|
|
Regression in b8e5a8a9a2a767f584cbe89a878a42363706f939.
Refs #36404.
The replace_expressions method was innapropriately dealing with falsey
but not None source expressions causing them to also be potentially
evaluated when __bool__ was invoked (e.g. QuerySet.__bool__ evaluates
the queryset).
The changes introduced in b8e5a8a9a2, which were to deal with a similar
issue, surfaced the problem as aggregation over an annotated queryset
requires an inlining (or pushdown) of aggregate references which is
achieved through replace_expressions.
In cases where an empty Q object was provided as an aggregate filter,
such as when the admin facetting feature was used as reported, it would
wrongly be turned into None, instead of an empty WhereNode, causing a
crash at aggregate filter compilation.
Note that the crash signature differed depending on whether or not the
backend natively supports aggregate filtering
(supports_aggregate_filter_clause) as the fallback, which makes use
Case / When expressions, would result in a TypeError instead of a
NoneType AttributeError.
Thanks Rafael Urben for the report, Antoliny and Youngkwang Yang for
the triage.
|
|
feature flags.
Needed on MongoDB.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Co-authored-by: Karl Wooster <karl.wooster@alleima.com>
|
|
Thanks Lily for the review.
|
|
Regression in e44e8327d3d88d86895735c0e427102063ff5b55.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
|
|
dictionary expansion.
|
|
_connector kwarg.
Thanks cyberstan for the report, Sarah Boyce, Adam Johnson, Simon
Charette, and Jake Howard for the reviews.
|
|
Proxy models subclassing a model with a CompositePrimaryKey were
incorrectly reporting check errors because the check that requires only
local fields to be used in a composite pk was evaluated against the proxy
subclass, which has no fields.
To fix this, composite pk field checks are not evaluated against
proxy subclasses, as none of the checks are applicable to proxy
subclasses. This also has the benefit of not double-reporting real check
errors from an invalid superclass pk.
Thanks Clifford Gama for the review.
|
|
Key and index lookups are exempt from the deprecation.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
Thanks Jacob Walls for the review.
|
|
|
|
missing from explicit grouping."
This reverts commit ea3a71c2d09f8281d8a50ed20e40e1fb13db5cd9.
The implementation was flawed, as self.group_by contains Cols, not aliases.
|
|
explicit grouping.
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
distinct(*fields).
|
|
|
|
Thanks Simon Charette for pair programming.
Co-authored-by: Nick Stefan <NickStefan12@gmail.com>
Co-authored-by: Akash Kumar Sen <71623442+Akash-Kumar-Sen@users.noreply.github.com>
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
This change allows the pattern `MyModel.objects.fetch_mode(...).create(...)` to
set the fetch mode for a new object.
|
|
This change ensures that behavior and performance remain consistent when
traversing relationships.
|
|
Modify these methods to accept an instance parameter which is clearer and
allows us to set the instance hint earlier.
|
|
This change ensures that we don’t create new instances of fetch modes
when pickling and unpickling, saving memory and preserving their singleton
nature.
|
|
May your database queries be much reduced with minimal effort.
co-authored-by: Andreas Pelme <andreas@pelme.se>
co-authored-by: Simon Charette <charette.s@gmail.com>
co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
boot time.
Co-authored-by: Fabien MICHEL <fmichel@adista.fr>
|
|
when aggregating.
|
|
|
|
ForeignObject in Meta.indexes/constraints/unique_together.
ForeignObjects with multiple `from_fields` are not supported in these
options.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
Regression in 8638d8bf74c1a58302c97d4436ad2eb08438145b.
Refs #36273.
Thanks Federico Bond for the report.
|
|
and extra() against SQL injection in column aliases on MySQL/MariaDB.
Thanks sw0rd1ight for the report.
Follow up to 93cae5cb2f9a4ef1514cf1a41f714fef08005200.
|
|
Thanks to Jacob Walls and Simon Charette for their input.
co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
|
|
Now that the setup is a bit more expensive, it makes sense to return earlier
for the empty case.
|
|
.values_list().
co-authored-by: Adam Johnson <me@adamj.eu>
co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
|
|
when keep_parents=True.
Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
|
|
ManyToManyField was already excluded from fields, concrete_fields,
and local_concrete_fields in Options.
|
|
Follow-up to cb13792938f2c887134eb6b5164d89f8d8f9f1bd. Refs #34437.
|
|
MySQL only supports the ->> when used directly against columns, this can be
inferred by the presence of lhs.output_field.model as model bounds fields are
directly tied to columns.
Purposely don't systematically switch to using JSON_QUOTE(JSON_EXTRACT(...))
as there might be functional indices out there that rely on the SQL remaining
stable between versions.
Thanks Jacob Tavener for the report.
|