mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 23:39:51 +01:00
Perform the duplicate check of parameter names already on initial creation
This fixes issue #568
This commit is contained in:
@@ -26,6 +26,7 @@ use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\Parameters\AbstractParameter;
|
||||
use App\Repository\StructuralDBElementRepository;
|
||||
use App\EntityListeners\TreeCacheInvalidationListener;
|
||||
use App\Validator\Constraints\UniqueObjectCollection;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use App\Entity\Attachments\AttachmentContainingDBElement;
|
||||
use App\Entity\Parameters\ParametersTrait;
|
||||
@@ -115,6 +116,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
|
||||
* @phpstan-var Collection<int, PT>
|
||||
*/
|
||||
#[Assert\Valid]
|
||||
#[UniqueObjectCollection(fields: ['name', 'group', 'element'])]
|
||||
protected Collection $parameters;
|
||||
|
||||
/** @var string[] all names of all parent elements as an array of strings,
|
||||
|
||||
Reference in New Issue
Block a user