| Age | Commit message (Collapse) | Author |
|
Avoids reports of bulk_update() sending Cast expressions
to JSONField.get_prep_value().
Co-authored-by: Simon Charette <charette.s@gmail.com>
Backport of 0bf412111be686b6b23e00863f5d449d63557dbf from main.
|
|
non-pk to_field.
Regression in 66e47ac69a7e71cf32eee312d05668d8f1ba24bb.
Thanks mfontana-elem for the report and Sarah for the tests.
Backport of c3a23aa02faa1cf1d32e43d66858e793cd9ecac4 from main.
|
|
Adding proper support for subquery right-hand-sides to TupleIn made it
obsolete.
Backport of d386405e04dac50656af50d100a14efdf8c58e8f from main
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
composite pks.
Thanks Jacob Walls for the report.
Backport of 8561100425876bde3be4b2a22324655f74ff9609 from main.
|
|
lookups.
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.
Backport of 41239fe34d64e801212dccaa4585e4802d0fac68 from main.
|
|
support.
This should allow backends more easily opt-in or out of native support and rely
on the fallback if unavailable.
Backport of a0a765ddeb5056c85e084773d3f6432e2a426638 from main.
|
|
This should allow third-party backends to define Tuple.as_vendor()
overrides that are taken into consideration which calling as_sql()
directly prevents.
Backport of c326cfe3b1683e6c205f53a4ad11feba6623a399 from main
|
|
ManyToManyField.through_fields.
Added through_fields support to ManyToManyField.deconstruct.
Thanks to Simon Charette for pointers and the review.
Backport of b13b8684a04d0bc1081104c5973c62c27dc673b0 from main.
|
|
The original queryset._next_is_sticky() call never had the intended effect as
no further filtering was applied internally after the pk__in lookup making it
a noop.
In order to be coherent with how related filters are applied when retrieving
objects from a related manager the effects of what calling _next_is_sticky()
prior to applying annotations and filters to the queryset provided for
prefetching are emulated by allowing the reuse of all pre-existing JOINs.
Thanks David Glenck and Thiago Bellini Ribeiro for the detailed reports and
tests.
Backport of 2598b371a93e21d84b7a2a99b2329535c8c0c138 from main.
|
|
The get_(local|foreign)_related_value methods of GenericRelation must be
reversed because it defines (from|to)_fields and associated related_fields
in the reversed order as it's effectively a reverse GenericForeignKey
itself.
The related value methods must also account for the fact that referenced
primary key values might be stored as a string on the model defining the
GenericForeignKey but as integer on the model defining the GenericRelation.
This is achieved by calling the to_python method of the involved content type
in get_foreign_related_value just like GenericRelatedObjectManager does.
Lastly reverse many-to-one manager's prefetch_related_querysets should use
set_cached_value instead of direct attribute assignment as direct assignment
might are disallowed on ReverseManyToOneDescriptor descriptors. This is likely
something that was missed in f5233dc (refs #32511) when the is_cached guard
was added.
Thanks 1xinghuan for the report.
Backport of 198b30168d4e94af42e0dc7967bd3259b5c5790b from main.
|
|
Rely on ColPairs and TupleIn which support a single column to be specified
to avoid special casing ForwardManyToOne.get_prefetch_querysets().
Thanks Jacob Walls for the report.
Backport of 626d77e52a3f247358514bcf51c761283968099c from main.
|
|
Thanks Saravana Kumar for the report, and Sarah Boyce and Mariusz
Felisiak for the reviews.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
Oracle doesn't support native tuple comparison so each as_oracle implementation
of tuple lookups must also perform right-hand-side sanitization.
|
|
|
|
This avoids many awkward checks against NOT_PROVIDED and provides symmetry
with Field.has_default() which is also the reason why it wasn't made a
property.
|
|
|
|
aggregates.
|
|
sanity checks.
These checks are not backend-dependent.
|
|
|
|
ForeignKey/ForeignObject/ManyToManyField to CompositePrimaryKeys.
|
|
|
|
DatabaseOperations.adapt_decimalfield_value().
Regression in e9814029f570bd0866dc859147bca90340bcc913.
Thanks Simon Charette for advice and review.
|
|
usage on Oracle.
Thanks Seokchan Yoon for the report, and Mariusz Felisiak and Sarah
Boyce for the reviews.
|
|
|
|
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>
|
|
DatabaseFeatures.supports_expression_defaults = False.
|
|
|
|
|
|
|
|
Regression in 1eac690d25dd49088256954d4046813daa37dc95.
|
|
|
|
|
|
This also removed unreachable checks.
|
|
is set.
|
|
FieldCacheMixin.get_cache_name().
|
|
get_joining_columns()/get_reverse_joining_columns().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FieldCacheMixin.
FieldCacheMixin is used by related fields to track their cached values.
This work migrates get_cache_name() to be a cached property to optimize
performance by reducing unnecessary function calls when working with
related fields, given that its value remains constant.
Co-authored-by: Simon Charette <charette.s@gmail.com>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
FileField.
|
|
GeneratedFields in aliased tables.
Thanks Simon Charette for the review.
|
|
|
|
|
|
|
|
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
|