diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-02-24 07:42:09 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-03-06 20:50:31 +0100 |
commit | 46bbd8d321e6a00131f0e6ed96fa6f3d693b3678 (patch) | |
tree | 331d511837716ec7a7956c35f51dc3a14a1ca11c /src/Wallabag/CoreBundle/Entity/Entry.php | |
parent | 6c87418ff013cfd03093c3f01e20518e580d80bb (diff) | |
download | wallabag-46bbd8d321e6a00131f0e6ed96fa6f3d693b3678.tar.gz wallabag-46bbd8d321e6a00131f0e6ed96fa6f3d693b3678.tar.zst wallabag-46bbd8d321e6a00131f0e6ed96fa6f3d693b3678.zip |
relation between tags and entries
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index e0d1b839..229a6704 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -120,11 +120,8 @@ class Entry | |||
120 | private $user; | 120 | private $user; |
121 | 121 | ||
122 | /** | 122 | /** |
123 | * @ORM\ManyToMany(targetEntity="Tag", inversedBy="entries", cascade={"persist", "merge"}) | 123 | * @ORM\ManyToMany(targetEntity="Tag", inversedBy="entries", cascade={"persist"}) |
124 | * @ORM\JoinTable(name="tags_entries", | 124 | * @ORM\JoinTable(name="entry_tags") |
125 | * joinColumns={@ORM\JoinColumn(name="entry_id", referencedColumnName="id")}, | ||
126 | * inverseJoinColumns={@ORM\JoinColumn(name="tag_id", referencedColumnName="id")} | ||
127 | * ) | ||
128 | */ | 125 | */ |
129 | private $tags; | 126 | private $tags; |
130 | 127 | ||
@@ -407,5 +404,6 @@ class Entry | |||
407 | public function addTag(Tag $tag) | 404 | public function addTag(Tag $tag) |
408 | { | 405 | { |
409 | $this->tags[] = $tag; | 406 | $this->tags[] = $tag; |
407 | $tag->addEntry($this); | ||
410 | } | 408 | } |
411 | } | 409 | } |