We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7e8a07 commit 9a12aebCopy full SHA for 9a12aeb
reference/constraints/UniqueEntity.rst
@@ -149,3 +149,15 @@ repositoryMethod
149
The name of the repository method to use for making the query to determine the
150
uniqueness. If it's left blank, the ``findBy`` method will be used. This
151
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