⚡ ability to delete objects in cascade
This commit is contained in:
parent
eed747f289
commit
060df2005d
|
@ -5,7 +5,7 @@ namespace AppBundle\Entity;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* ExpenseKind
|
||||
* ExpenseKind, for previsional compta
|
||||
*
|
||||
* @ORM\Table(name="expense_kind")
|
||||
* @ORM\Entity(repositoryClass="AppBundle\Repository\ExpenseKindRepository")
|
||||
|
|
|
@ -40,7 +40,7 @@ class Festival {
|
|||
/**
|
||||
* @var \stdClass
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\SellRecord",mappedBy="festival")
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\SellRecord",mappedBy="festival", cascade={"remove"})
|
||||
*/
|
||||
private $sellRecords;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class Product {
|
|||
*/
|
||||
private $user;
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\ProductSold", mappedBy="product")
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\ProductSold", mappedBy="product", cascade={"remove"})
|
||||
*/
|
||||
private $productsSold;
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ class ProductCategory {
|
|||
private $name;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Product", mappedBy="category")
|
||||
* @ORM\OneToMany(targetEntity="Product", mappedBy="category", cascade={"remove"})
|
||||
*/
|
||||
private $products;
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="ProductSold", mappedBy="product")
|
||||
* @ORM\OneToMany(targetEntity="ProductSold", mappedBy="product", cascade={"remove"})
|
||||
*/
|
||||
private $productsSold;
|
||||
|
||||
|
|
Loading…
Reference in New Issue