📖 cascade properties of owner

This commit is contained in:
Baptiste Lemoine 2019-11-12 12:01:15 +01:00
parent ffb8b14b53
commit d1dd8955a3
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class Owner {
*/
private $email;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Poll", mappedBy="owner",cascade={"persist"})
* @ORM\OneToMany(targetEntity="App\Entity\Poll", mappedBy="owner",cascade={"persist","remove"})
* @Serializer\Type("App\Entity\Poll")
*/
private $polls;

View File

@ -19,7 +19,7 @@ class StackOfVotes {
private $id;
/**
* @ORM\OneToMany(targetEntity="App\Entity\poll", mappedBy="stacksOfVotes")
* @ORM\OneToMany(targetEntity="App\Entity\poll", mappedBy="stacksOfVotes", cascade={"persist","remove"})
*/
private $votes;