Skip to content

Commit 6bda03b

Browse files
Update relations on Product deletions
1 parent 65f7025 commit 6bda03b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Entity/CartProduct.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CartProduct
3434

3535
/**
3636
* @ORM\ManyToOne(targetEntity="\Alpixel\Bundle\ShopBundle\Entity\Product", cascade={"persist"})
37-
* @ORM\JoinColumn(name="product_id", referencedColumnName="id")
37+
* @ORM\JoinColumn(name="product_id", referencedColumnName="id", onDelete="CASCADE")
3838
*/
3939
private $product;
4040

0 commit comments

Comments
 (0)