forked from mirror/Part-DB.Part-DB-server
Added some constraints and validations to the BOM entries.
This commit is contained in:
parent
4e3cad577e
commit
b83b55b8d4
6 changed files with 99 additions and 10 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue