]> git.immae.eu Git - github/wallabag/wallabag.git/commit
Change ManyToMany between entry & tag 2122/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Mon, 30 May 2016 12:34:11 +0000 (14:34 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Tue, 31 May 2016 08:01:03 +0000 (10:01 +0200)
commit3be047456d6f91d8ef5404c9c7698e0d1f9a057d
tree6914fc02866751594b2d73387adb826bbce980f8
parent39ba51ca1af3085c3a7eb6dabdfae38c5034db1b
Change ManyToMany between entry & tag

Following https://gist.github.com/Ocramius/3121916

Be sure to remove the related entity when removing an entity.

Let say you have Entry -> EntryTag -> Tag.
If you remove the entry:

 - before that commit, the EntryTag will stay (at least using SQLite).
 - with that commit, the related entity is removed
src/Wallabag/CoreBundle/DataFixtures/ORM/LoadConfigData.php
src/Wallabag/CoreBundle/Entity/Entry.php
src/Wallabag/CoreBundle/Entity/Tag.php
src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php