Forum: cascade persist and orphanRemoval for forum threads and posts

pull/4344/head
Angel Fernando Quiroz Campos 2 years ago
parent d77daee04c
commit 0b12415efd
  1. 4
      src/CourseBundle/Entity/CForum.php

@ -150,14 +150,14 @@ class CForum extends AbstractResource implements ResourceInterface
/**
* @var Collection|CForumThread[]
*
* @ORM\OneToMany(targetEntity="Chamilo\CourseBundle\Entity\CForumThread", mappedBy="forum")
* @ORM\OneToMany(targetEntity="Chamilo\CourseBundle\Entity\CForumThread", mappedBy="forum", cascade={"persist"}, orphanRemoval=true)
*/
protected Collection $threads;
/**
* @var Collection|CForumPost[]
*
* @ORM\OneToMany(targetEntity="Chamilo\CourseBundle\Entity\CForumPost", mappedBy="forum")
* @ORM\OneToMany(targetEntity="Chamilo\CourseBundle\Entity\CForumPost", mappedBy="forum", cascade={"persist"}, orphanRemoval=true)
*/
protected Collection $posts;

Loading…
Cancel
Save