Skip to content

Commit 8e4e47a

Browse files
committed
[DoctrineBridge] Document the new entityClass option
1 parent 2b027a9 commit 8e4e47a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

reference/constraints/UniqueEntity.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ using an email address that already exists in the system.
1212
| | - `message`_ |
1313
| | - `em`_ |
1414
| | - `repositoryMethod`_ |
15+
| | - `entityClass`_ |
1516
| | - `errorPath`_ |
1617
| | - `ignoreNull`_ |
1718
| | - `payload`_ |
@@ -164,6 +165,19 @@ The name of the repository method to use for making the query to determine
164165
the uniqueness. If it's left blank, the ``findBy`` method will be used.
165166
This method should return a countable result.
166167

168+
entityClass
169+
~~~~~~~~~~~
170+
171+
**type**: ``string`` **default**: ``null``
172+
173+
.. versionadded:: 3.2
174+
The ``entityClass`` option was introduced in Symfony 3.2.
175+
176+
The fully-qualified class name (FQCN) of the entity to get the repository used for making the query to determine
177+
the uniqueness. If it's left blank, the exact entity instance repository will be used.
178+
If set, the selected entity repository will be used regardless of the real class of the instance.
179+
It's particularly useful when dealing with Doctrine Inheritance Mapping.
180+
167181
errorPath
168182
~~~~~~~~~
169183

0 commit comments

Comments
 (0)