We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b18f4a0 commit 1126d11Copy full SHA for 1126d11
1 file changed
EventListener/StringGeneratorListener.php
@@ -72,6 +72,10 @@ private function generateId($property, Vivait\StringGenerator $annotation)
72
$str = sprintf("%s%s%s", $annotation->prefix, $annotation->separator, $str);
73
}
74
75
+ if (!$annotation->unique) {
76
+ return $str;
77
+ }
78
+
79
if ($this->repo->findOneBy([$property => $str])) {
80
return $this->generateId($property, $annotation);
81
} else {
0 commit comments