mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Allow only a single orderinfo with a supplier and order nr.
This commit is contained in:
parent
25a4f804d7
commit
3b4d6e0736
1 changed files with 2 additions and 0 deletions
|
@ -59,6 +59,7 @@ use App\Entity\Parts\Supplier;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,6 +68,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||||
* @ORM\Table("`orderdetails`")
|
* @ORM\Table("`orderdetails`")
|
||||||
* @ORM\Entity()
|
* @ORM\Entity()
|
||||||
* @ORM\HasLifecycleCallbacks()
|
* @ORM\HasLifecycleCallbacks()
|
||||||
|
* @UniqueEntity({"supplierpartnr", "supplier", "part"})
|
||||||
*/
|
*/
|
||||||
class Orderdetail extends AbstractDBElement implements TimeStampableInterface, NamedElementInterface
|
class Orderdetail extends AbstractDBElement implements TimeStampableInterface, NamedElementInterface
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue