| Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
with OpClass().
This also introduces Expression.constraint_validation_compatible that
allows specifying that expression should be ignored during a constraint
validation.
|
|
|
|
Affected models where the primary key field is defined with a
default or db_default, such as UUIDField.
|
|
referencing rename field.
Thanks Sarah Boyce for the report and Simon Charette for the
implementation idea.
|
|
referenced by GeneratedField.expression.
Thank you to Simon Charette for the review.
|
|
Thank you to Mariusz Felisiak and Natalia Bidart for the reviews.
|
|
|
|
Refactored the filter and order_by expressions in the Aggregate class to
return a list of Expression (or None) values, ensuring that the list
item is always available and represents the filter expression.
For the PostgreSQL OrderableAggMixin, the returned list will always
include the filter and the order_by value as the last two elements.
Lastly, emtpy Q objects passed directly into aggregate objects using
Aggregate.filter in admin facets are filtered out when resolving the
expression to avoid errors in get_refs().
Thanks Simon Charette for the review.
|
|
By always including related objects in the select mask via adjusting the
defer logic (_get_defer_select_mask()), it becomes possible for
select_related_descend() to treat forward and reverse relationships
indistinctively.
This work also simplifies and adds comments to
select_related_descend() to make it easier to understand.
|
|
While refs #34612 surfaced issues with reverse one-to-one fields
deferrals, it missed that switching to storing remote fields would break
self-referential relationships.
This change switches to storing related objects in the select mask
instead of remote fields to prevent collisions when dealing with
self-referential relationships that might have a different directional
mask.
Despite fixing #21204 introduced a crash under some self-referential
deferral conditions, it was simply not working even before that as it
aggregated the sets of deferred fields by model.
Thanks Joshua van Besouw for the report and Mariusz Felisiak for the
review.
|
|
from django.db.models.
Thanks James Ostrander for the report and fix, and to Tim Graham and
Mariusz Felisiak for the reviews.
|
|
Generated fields have to be excluded from the INSERT query against the remade
table including the index.
Thanks Moshe Dicker for the report, David Sanders and Mariusz Felisiak for the
review.
|
|
backends.oracle.tests.TransactionalTests.test_hidden_no_data_found_exception() on oracledb >= 2.1.2.
python-oracledb 2.1.2+ no longer hides 'ORA-1403: no data found'
exceptions raised in database triggers:
https://github.com/oracle/python-oracledb/issues/321
|
|
Thanks Matt Hegarty for the report and Simon Charette and Natalia Bidart for the reviews.
Regression in f333e35.
|
|
A longer term solution is likely to have a better separation of parametrized
DDL altogether to handle checks, constraints, defaults, and generated fields
but such a change would require a significant refactor that isn't suitable
for a backport.
Thanks Adrian Garcia for the report.
|
|
GeneratedFields in aliased tables.
Thanks Simon Charette for the review.
|
|
Thanks Tim Graham for the report.
Regression in 0fb104dda287431f5ab74532e45e8471e22b58c8.
|
|
constraints with nulls_distinct.
Bug in 595a2abb58e04caa4d55fb2589bb80fb2a8fdfa1.
Thanks Lucas Lemke Saunitti for the report.
|
|
Unused since ae0899be0d787fbfc5f5ab2b18c5a8219d822d2b.
|
|
|
|
IntegerField/DecimalField with NULL.
|
|
|
|
Regression in faeb92ea13f0c1b2cc83f45b512f2c41cfb4f02d.
|
|
model_fields.test_jsonfield.TestQuerying.test_usage_in_subquery on Oracle 23c.
|
|
Oracle 23c supports comparing boolean expressions.
|
|
co-authored-by: Gordon <gordon.wrigley@gmail.com>
co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
|
|
|
|
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
|
|
|
|
|
|
|
|
co-authored-by: Nick Pope <nick@nickpope.me.uk>
|
|
accessing deferred fields.
Regression in a7b5ad8b19a08d7d57302ece74f6e26d2887fd9f for reverse
relations and possibly in 123b1d3fcf79f091573c40be6da7113a6ef35b62 for
private fields.
|
|
|
|
validating empty values.
Thanks Brian Ibbotson for the report.
Regression in 7414704e88d73dafbcfbb85f9bc54cb6111439d3.
|
|
|
|
|
|
|
|
binding with psycopg 3+.
|
|
|
|
Co-authored-by: Florian Apolloner <florian@apolloner.eu>
Co-authored-by: Ran Benita <ran@unusedvar.com>
|
|
Once the deprecation period ends CheckConstraint.check() can become the
documented method that performs system checks for BaseConstraint
subclasses.
|
|
|
|
PostgreSQL.
ensure_role() is only called in init_connection_state() where a new
connection is established.
|
|
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
co-authored-by: Keryn Knight <keryn@kerynknight.com>
co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
co-authored-by: David Smith <smithdc@gmail.com>
co-authored-by: Paolo Melchiorre <paolo@melchiorre.org>
|