mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-29 21:14:29 +02:00
Perform the duplicate check of parameter names already on initial creation
This fixes issue #568
This commit is contained in:
parent
dfe4568991
commit
b70d74ae4b
4 changed files with 12 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue