| Age | Commit message (Collapse) | Author |
|
composite pk.
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.
Backport of 74564946c3b42a2ef7d087047e49873847a7e1d9 from main.
|
|
Backport of bee64561a6e8cd22995c2b1254bab66dae892a6d from main.
|
|
first()/last() when aggregating.
Backport of 02eed4f37879b2077496f86bb1378a076b981233 from main.
|
|
ManyToManyField was already excluded from fields, concrete_fields,
and local_concrete_fields in Options.
Backport of f9a44cc0fac653f8e0c2ab1cdfb12b2cc5c63fc2 from main
|
|
FieldError is now emitted for invalid update calls involving reverse
relations, where previously they failed with AttributeError.
|
|
values()/values_list().
Thanks Jacob Walls and Simon Charette for tests.
Signed-off-by: SaJH <wogur981208@gmail.com>
|
|
QuerySet.in_bulk().
|
|
against composite pks.
Follow-up to 8561100425876bde3be4b2a22324655f74ff9609.
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
|
|
expressions.
Thanks Jacob Walls for the report, and Sarah Boyce and Mariusz Felisiak
for reviews.
|
|
When native support for tuple lookups is missing in a DB backend, it can
be emulated with an EXISTS clause. This is controlled by the backend
feature flag "supports_tuple_lookups".
The mishandling of subquery right-hand side in `TupleIn` (added to
support `CompositePrimaryKey` in Refs #373) was likely missed because
the only core backend we test with the feature flag disabled
(Oracle < 23.4) supports it natively.
Thanks to Nandana Raol for the report, and to Sarah Boyce, Jacob Walls,
and Natalia Bidart for reviews.
|
|
|
|
selects too many columns.
|
|
composite pk.
Thanks Jacob Walls for the report and Sarah for the in-depth review.
|
|
Signed-off-by: SaJH <wogur981208@gmail.com>
|
|
Now that selected aliases are stored in sql.Query.selected: dict[str, Any]
the values_list() method must ensures that duplicate field name references are
assigned unique aliases.
Refs #28900.
Regression in 65ad4ade74dc9208b9d686a451cd6045df0c9c3a.
Thanks Claude for the report.
|
|
Just like the In() lookup discards of None members TupleIn() should
discard tuples containing any None as NULL != NULL in SQL and the
framework expects such queries to be elided under some circumstances.
Refs #31667, #36116.
Thanks Basptise Mispelon for bisecting the regression to 626d77e.
|
|
Thanks Jacob Walls for the report.
|
|
Non-tuple exact and in lookups have specialized logic for subqueries that can
be adapted to properly assign select mask if unspecified and ensure the number
of involved members are matching on both side of the operator.
|
|
Thanks Jacob Walls for the report and test.
|
|
field with QuerySet.update().
|
|
case / when.
Remove redundant Case and When.resolve_expression to delegate composite
expression support to BaseExpression.
Thanks Jacob Tyler Walls for the report and test.
|
|
Remove redundant Func.resolve_expression and adjust CombinedExpression to
delegate source expression resolving to super() to perform checks against
allows_composite_expressions in a single location.
|
|
|
|
Regression in bf7b17d16d3978b2e1cee4a0f7ce8840bd1a8dc4.
Thanks Sage Abdullah for the report.
|
|
|
|
|
|
|
|
composite primary key with default values.
|
|
bulk_create() update_fields.
|
|
|
|
|
|
Thanks Jacob Walls for the report and test and Csirmaz Bendegúz for the review.
|
|
|
|
aggregates.
|
|
|
|
sanity checks.
These checks are not backend-dependent.
|
|
|
|
The test failed with "NOT NULL constraint failed" rather than
"UNIQUE constraint failed: tenant_id, comment_id".
|
|
|
|
composite primary keys.
|
|
CompositePKChecksTests.test_composite_pk_cannot_include_generated_field() test crash on databases with no GeneratedField support.
|
|
Thanks Lily Foote and Simon Charette for reviews and mentoring
this Google Summer of Code 2024 project.
Co-authored-by: Simon Charette <charette.s@gmail.com>
Co-authored-by: Lily Foote <code@lilyf.org>
|