From eca26a15e6317b0a0e0a258f3c295fb6906203d6 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 19 Sep 2023 09:42:46 +0200 Subject: [PATCH] Bugfix document mappedsuperclass should not contain id property --- .../Entity/AccompanyingCourseDocument.php | 19 +++++++++++++++++++ .../ChillDocStoreBundle/Entity/Document.php | 12 ------------ .../Entity/PersonDocument.php | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php index d0613f9a3..ff74a0b26 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php @@ -28,6 +28,13 @@ class AccompanyingCourseDocument extends Document implements HasScopesInterface, */ private ?AccompanyingPeriod $course = null; + /** + * @ORM\Id + * @ORM\GeneratedValue + * @ORM\Column(type="integer") + */ + private $id; + public function getCenters(): ?iterable { return $this->course->getCenters(); @@ -38,6 +45,11 @@ class AccompanyingCourseDocument extends Document implements HasScopesInterface, return $this->course; } + public function getId() + { + return $this->id; + } + public function getScopes(): iterable { if (null === $this->course) { @@ -53,4 +65,11 @@ class AccompanyingCourseDocument extends Document implements HasScopesInterface, return $this; } + + public function setId($id): self + { + $this->id = $id; + + return $this; + } } diff --git a/src/Bundle/ChillDocStoreBundle/Entity/Document.php b/src/Bundle/ChillDocStoreBundle/Entity/Document.php index 2345aef61..ec2a19d11 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/Document.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/Document.php @@ -49,13 +49,6 @@ class Document implements TrackCreationInterface, TrackUpdateInterface */ private $description = ''; - /** - * @ORM\Id - * @ORM\GeneratedValue - * @ORM\Column(type="integer") - */ - private $id; - /** * @ORM\ManyToOne( * targetEntity="Chill\DocStoreBundle\Entity\StoredObject", @@ -103,11 +96,6 @@ class Document implements TrackCreationInterface, TrackUpdateInterface return $this->description; } - public function getId() - { - return $this->id; - } - public function getObject(): ?StoredObject { return $this->object; diff --git a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php index 1124cbbfd..22e7c3f48 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php @@ -23,6 +23,13 @@ use Doctrine\ORM\Mapping as ORM; */ class PersonDocument extends Document implements HasCenterInterface, HasScopeInterface { + /** + * @ORM\Id + * @ORM\GeneratedValue + * @ORM\Column(type="integer") + */ + private $id; + /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ @@ -40,6 +47,11 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt return $this->getPerson()->getCenter(); } + public function getId() + { + return $this->id; + } + public function getPerson(): Person { return $this->person; @@ -50,6 +62,13 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt return $this->scope; } + public function setId($id): self + { + $this->id = $id; + + return $this; + } + public function setPerson($person): self { $this->person = $person;