From 13a6a8eb4bc04f85b5a92fa1a6243c6adfb73bd8 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 15 Apr 2019 16:38:34 +0200 Subject: [PATCH] Added a note about UniqueEntity and collections --- reference/constraints/UniqueEntity.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 11f783e5a66..1628d9997d6 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -114,6 +114,12 @@ your user table: this validation has passed and before this entity is actually persisted in the database. +.. caution:: + + This constraint cannot deal with duplicates found in a collection of items + that haven't been persisted as entities yet. You'll need to create your own + validator to handle that case. + Options -------