mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
add route for comment + track update/creation of entities
This commit is contained in:
@@ -117,7 +117,9 @@ class AccompanyingPeriod
|
||||
* @var Collection
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod\Comment",
|
||||
* mappedBy="accompanyingPeriod"
|
||||
* mappedBy="accompanyingPeriod",
|
||||
* cascade={"persist", "remove"},
|
||||
* orphanRemoval=true
|
||||
* )
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
@@ -350,12 +352,14 @@ class AccompanyingPeriod
|
||||
public function addComment(Comment $comment): self
|
||||
{
|
||||
$this->comments[] = $comment;
|
||||
$comment->setAccompanyingPeriod($this);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeComment(Comment $comment): void
|
||||
{
|
||||
$comment->setAccompanyingPeriod(null);
|
||||
$this->comments->removeElement($comment);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user