summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2024-05-12 20:10:55 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-05-14 10:34:30 +0200
commitf030236a86a64a4befd3cc8093e2bbeceef52a31 (patch)
tree170718dd1a0685ee154ea7f6e3a52cae998a6062 /docs/ref
parentceaf1e2848583ba832cc74715da38c802b6b0671 (diff)
Fixed #35275 -- Fixed Meta.constraints validation crash on UniqueConstraint with OpClass().
This also introduces Expression.constraint_validation_compatible that allows specifying that expression should be ignored during a constraint validation.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/expressions.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index 67baef7dfc..f630142294 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -1058,6 +1058,15 @@ calling the appropriate methods on the wrapped expression.
Tells Django that this expression can be used in
:attr:`Field.db_default`. Defaults to ``False``.
+ .. attribute:: constraint_validation_compatible
+
+ .. versionadded:: 5.1
+
+ Tells Django that this expression can be used during a constraint
+ validation. Expressions with ``constraint_validation_compatible`` set
+ to ``False`` must have only one source expression. Defaults to
+ ``True``.
+
.. attribute:: contains_aggregate
Tells Django that this expression contains an aggregate and that a