diff --git a/Validator/UniqueValidator.php b/Validator/UniqueValidator.php
index <HASH>..<HASH> 100644
--- a/Validator/UniqueValidator.php
+++ b/Validator/UniqueValidator.php
@@ -60,6 +60,7 @@ class UniqueValidator extends ConstraintValidator
         if (
             $id !== null
             && count($entities) === 1
+            && $accessor->getValue($object, $id) !== null
             && $entityManager->getReference($class, $accessor->getValue($object, $id)) === current($entities)
         ) {
             return;
Ignore ID attribute when it is null in Unique validator. (#<I>)

Ignore ID attribute when it is null in Unique validator