From 9a12aebcb84fd954d518e9a4ed3dedc2b5817284 Mon Sep 17 00:00:00 2001 From: jockri Date: Thu, 25 Apr 2013 10:41:24 +0200 Subject: [PATCH 1/2] Added missing UniqueEntity ignoreNull documentation --- reference/constraints/UniqueEntity.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 5ec43a1c225..fa895734a37 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -149,3 +149,15 @@ repositoryMethod The name of the repository method to use for making the query to determine the uniqueness. If it's left blank, the ``findBy`` method will be used. This method should return a countable result. + +ignoreNull +~~~~~~~~~~ + +**type**: ``Boolean`` **default**: ``true`` + +.. versionadded:: 2.1 + The ``ignoreNull`` option was added in Symfony 2.1. + +If this option is set to ``true``, it allows having multiple ``null`` values for +the field(s) without failing the unique constraint. If set to ``false``, only one +``null`` value is allowed. From 596bea5ddafed02b319cd07423e02576be97b022 Mon Sep 17 00:00:00 2001 From: jockri Date: Thu, 25 Apr 2013 13:32:34 +0200 Subject: [PATCH 2/2] Moved version directive before heading --- reference/constraints/UniqueEntity.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index fa895734a37..1078bc1ebe9 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -12,6 +12,7 @@ using an email address that already exists in the system. | | - `message`_ | | | - `em`_ | | | - `repositoryMethod`_ | +| | - `ignoreNull`_ | +----------------+-------------------------------------------------------------------------------------+ | Class | :class:`Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\UniqueEntity` | +----------------+-------------------------------------------------------------------------------------+ @@ -150,14 +151,14 @@ The name of the repository method to use for making the query to determine the uniqueness. If it's left blank, the ``findBy`` method will be used. This method should return a countable result. +.. versionadded:: 2.1 + The ``ignoreNull`` option was added in Symfony 2.1. + ignoreNull ~~~~~~~~~~ **type**: ``Boolean`` **default**: ``true`` -.. versionadded:: 2.1 - The ``ignoreNull`` option was added in Symfony 2.1. - If this option is set to ``true``, it allows having multiple ``null`` values for the field(s) without failing the unique constraint. If set to ``false``, only one ``null`` value is allowed.