Skip to content

Commit b6b8b4b

Browse files
committed
minor #10051 Added a caution note about race conditions in EntityType (javiereguiluz)
This PR was merged into the 2.8 branch. Discussion ---------- Added a caution note about race conditions in EntityType Fixes #7305. Commits ------- e0ecfd3 Added a caution note about race conditions in EntityType
2 parents 2cb10d8 + e0ecfd3 commit b6b8b4b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

reference/constraints/UniqueEntity.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ your user table:
109109
}
110110
}
111111
112+
.. caution::
113+
114+
This constraint doesn't provide any protection against `race conditions`_.
115+
They may occur when another entity is persisted by an external process after
116+
this validation has passed and before this entity is actually persisted in
117+
the database.
118+
112119
Options
113120
-------
114121

@@ -262,3 +269,5 @@ If set to ``false``, only one ``null`` value is allowed - if a second entity
262269
also has a ``null`` value, validation would fail.
263270

264271
.. include:: /reference/constraints/_payload-option.rst.inc
272+
273+
.. _`race conditions`: https://en.wikipedia.org/wiki/Race_condition

0 commit comments

Comments
 (0)