Skip to content

Commit 9a12aeb

Browse files
committed
Added missing UniqueEntity ignoreNull documentation
1 parent d7e8a07 commit 9a12aeb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

reference/constraints/UniqueEntity.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,15 @@ repositoryMethod
149149
The name of the repository method to use for making the query to determine the
150150
uniqueness. If it's left blank, the ``findBy`` method will be used. This
151151
method should return a countable result.
152+
153+
ignoreNull
154+
~~~~~~~~~~
155+
156+
**type**: ``Boolean`` **default**: ``true``
157+
158+
.. versionadded:: 2.1
159+
The ``ignoreNull`` option was added in Symfony 2.1.
160+
161+
If this option is set to ``true``, it allows having multiple ``null`` values for
162+
the field(s) without failing the unique constraint. If set to ``false``, only one
163+
``null`` value is allowed.

0 commit comments

Comments
 (0)