From db7c439480a6f7ca2437dc9eef90a2354fe3fd6d Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Fri, 22 Feb 2019 00:13:39 +0100 Subject: [PATCH 1/2] Expanding on repositoryMethod --- reference/constraints/UniqueEntity.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 8b1697b07d5..9c5fe42868e 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -172,9 +172,12 @@ repositoryMethod **type**: ``string`` **default**: ``findBy()`` -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. +The name of a custom repository method to determine the uniqueness. +If it's left blank, ``findBy()`` will be used. The method gets passed +an indexed array with elements in the form ``fieldName => value`` +(where ``fieldName`` is the content of the ``fields`` option). +The method should return a +[countable](http://php.net/manual/function.is-countable.php) result. entityClass ~~~~~~~~~~~ From 66e797fb6d0092b41556c8aa0b3689d6d840735b Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Fri, 22 Feb 2019 00:16:27 +0100 Subject: [PATCH 2/2] Removing `()` since the method name is to be given without it --- reference/constraints/UniqueEntity.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 9c5fe42868e..7e72ca8df25 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -170,10 +170,10 @@ not need to be used. repositoryMethod ~~~~~~~~~~~~~~~~ -**type**: ``string`` **default**: ``findBy()`` +**type**: ``string`` **default**: ``findBy`` The name of a custom repository method to determine the uniqueness. -If it's left blank, ``findBy()`` will be used. The method gets passed +If it's left blank, ``findBy`` will be used. The method gets passed an indexed array with elements in the form ``fieldName => value`` (where ``fieldName`` is the content of the ``fields`` option). The method should return a