Skip to content

Added a caution note about race conditions in EntityType #10051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions reference/constraints/UniqueEntity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ your user table:
}
}

.. caution::

This constraint doesn't provide any protection against `race conditions`_.
They may occur when another entity is persisted by an external process after
this validation has passed and before this entity is actually persisted in
the database.

Options
-------

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

.. include:: /reference/constraints/_payload-option.rst.inc

.. _`race conditions`: https://en.wikipedia.org/wiki/Race_condition