diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index bf8db5ab..bd712a04 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -9,6 +9,7 @@ use JMS\Serializer\Annotation\Groups; | |||
9 | use JMS\Serializer\Annotation\XmlRoot; | 9 | use JMS\Serializer\Annotation\XmlRoot; |
10 | use Symfony\Component\Validator\Constraints as Assert; | 10 | use Symfony\Component\Validator\Constraints as Assert; |
11 | use Wallabag\UserBundle\Entity\User; | 11 | use Wallabag\UserBundle\Entity\User; |
12 | use Wallabag\AnnotationBundle\Entity\Annotation; | ||
12 | 13 | ||
13 | /** | 14 | /** |
14 | * Entry. | 15 | * Entry. |
@@ -98,13 +99,12 @@ class Entry | |||
98 | private $updatedAt; | 99 | private $updatedAt; |
99 | 100 | ||
100 | /** | 101 | /** |
101 | * @var string | 102 | * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"}) |
102 | * | 103 | * @ORM\JoinTable |
103 | * @ORM\Column(name="comments", type="text", nullable=true) | ||
104 | * | 104 | * |
105 | * @Groups({"export_all"}) | 105 | * @Groups({"entries_for_user", "export_all"}) |
106 | */ | 106 | */ |
107 | private $comments; | 107 | private $annotations; |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * @var string | 110 | * @var string |
@@ -366,19 +366,19 @@ class Entry | |||
366 | } | 366 | } |
367 | 367 | ||
368 | /** | 368 | /** |
369 | * @return string | 369 | * @return ArrayCollection<Annotation> |
370 | */ | 370 | */ |
371 | public function getComments() | 371 | public function getAnnotations() |
372 | { | 372 | { |
373 | return $this->comments; | 373 | return $this->annotations; |
374 | } | 374 | } |
375 | 375 | ||
376 | /** | 376 | /** |
377 | * @param string $comments | 377 | * @param Annotation $annotation |
378 | */ | 378 | */ |
379 | public function setComments($comments) | 379 | public function setAnnotation(Annotation $annotation) |
380 | { | 380 | { |
381 | $this->comments = $comments; | 381 | $this->annotations[] = $annotation; |
382 | } | 382 | } |
383 | 383 | ||
384 | /** | 384 | /** |