mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix relation inside calendar, bootstrap messenger for handling create and update calendar entity
This commit is contained in:
@@ -37,11 +37,13 @@ use Symfony\Component\Validator\Mapping\ClassMetadata;
|
||||
use function in_array;
|
||||
|
||||
/**
|
||||
* @ORM\Table(name="chill_calendar.calendar")
|
||||
* @ORM\Table(name="chill_calendar.calendar", indexes={@ORM\Index(name="idx_calendar_remote", columns={"remoteId"})}))
|
||||
* @ORM\Entity(repositoryClass=CalendarRepository::class)
|
||||
*/
|
||||
class Calendar implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
use RemoteCalendarTrait;
|
||||
|
||||
use TrackCreationTrait;
|
||||
|
||||
use TrackUpdateTrait;
|
||||
@@ -64,7 +66,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface
|
||||
private ?Activity $activity = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="CalendarRange", inversedBy="calendars")
|
||||
* @ORM\OneToOne(targetEntity="CalendarRange", inversedBy="calendar")
|
||||
* @Serializer\Groups({"calendar:read", "read"})
|
||||
*/
|
||||
private ?CalendarRange $calendarRange = null;
|
||||
@@ -405,6 +407,8 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
$this->calendarRange = $calendarRange;
|
||||
|
||||
$this->calendarRange->setCalendar($this);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user