Skip to content

Commit 31ec2a0

Browse files
committed
[Validator] UniqueEntity - add warning about not supported types and association mappings.
1 parent 28af525 commit 31ec2a0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

reference/constraints/UniqueEntity.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ between all of the rows in your user table:
139139
that haven't been persisted as entities yet. You'll need to create your own
140140
validator to handle that case.
141141

142+
.. warning::
143+
144+
This constraint does not support Doctrine types such as
145+
``simple_array``, ``json``, or ``jsonb``, nor does it handle association mappings
146+
like ``OneToMany`` and ``ManyToMany`` relationships. It may also not work correctly
147+
with custom Doctrine types. To perform uniqueness checks on such fields, you must
148+
define a custom ``repositoryMethod`` that implements the desired logic.
149+
142150
Options
143151
-------
144152

0 commit comments

Comments
 (0)