Added some constraints and validations to the BOM entries.

This commit is contained in:
Jan Böhmer 2022-12-26 13:57:11 +01:00
parent 4e3cad577e
commit b83b55b8d4
6 changed files with 99 additions and 10 deletions

View file

@ -29,6 +29,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use InvalidArgumentException;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Class AttachmentType.
@ -53,6 +54,7 @@ class Project extends AbstractStructuralDBElement
/**
* @ORM\OneToMany(targetEntity="ProjectBOMEntry", mappedBy="project", cascade={"persist", "remove"}, orphanRemoval=true)
* @Assert\Valid()
*/
protected $bom_entries;