ability to delete objects in cascade

This commit is contained in:
ty kayn 2019-07-04 19:34:46 +02:00
parent eed747f289
commit 060df2005d
4 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** /**
* ExpenseKind * ExpenseKind, for previsional compta
* *
* @ORM\Table(name="expense_kind") * @ORM\Table(name="expense_kind")
* @ORM\Entity(repositoryClass="AppBundle\Repository\ExpenseKindRepository") * @ORM\Entity(repositoryClass="AppBundle\Repository\ExpenseKindRepository")

View File

@ -40,7 +40,7 @@ class Festival {
/** /**
* @var \stdClass * @var \stdClass
* *
* @ORM\OneToMany(targetEntity="AppBundle\Entity\SellRecord",mappedBy="festival") * @ORM\OneToMany(targetEntity="AppBundle\Entity\SellRecord",mappedBy="festival", cascade={"remove"})
*/ */
private $sellRecords; private $sellRecords;

View File

@ -43,7 +43,7 @@ class Product {
*/ */
private $user; private $user;
/** /**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\ProductSold", mappedBy="product") * @ORM\OneToMany(targetEntity="AppBundle\Entity\ProductSold", mappedBy="product", cascade={"remove"})
*/ */
private $productsSold; private $productsSold;

View File

@ -21,11 +21,11 @@ class ProductCategory {
private $name; private $name;
/** /**
* @ORM\OneToMany(targetEntity="Product", mappedBy="category") * @ORM\OneToMany(targetEntity="Product", mappedBy="category", cascade={"remove"})
*/ */
private $products; private $products;
/** /**
* @ORM\OneToMany(targetEntity="ProductSold", mappedBy="product") * @ORM\OneToMany(targetEntity="ProductSold", mappedBy="product", cascade={"remove"})
*/ */
private $productsSold; private $productsSold;