aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-08-03 12:46:20 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-09-06 22:49:15 +0200
commit7c04b7396a296e31bb11beadc19550396ee728a8 (patch)
tree907da35635e18957fc981cb6d53b98dd6040290c /src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
parent78b36d4dbeedd60c5aa25dbd30a2a2d41a658f94 (diff)
downloadwallabag-7c04b7396a296e31bb11beadc19550396ee728a8.tar.gz
wallabag-7c04b7396a296e31bb11beadc19550396ee728a8.tar.zst
wallabag-7c04b7396a296e31bb11beadc19550396ee728a8.zip
Multiple tag search was broken from API
First, the setParameter() were done on the same parameter which in fact just duplicated the condition in the SQL query (like `where t.label = 'test' and t.label = 'test'`. Changed the parameter doesn't help because the query was then wrong. Changing the way to match associated tags for an entry and it worked.
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php')
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
index 6de561e0..0ecfd18b 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php
@@ -19,7 +19,7 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface
19 19
20 $manager->persist($tag1); 20 $manager->persist($tag1);
21 21
22 $this->addReference('foo-tag', $tag1); 22 $this->addReference('foo-bar-tag', $tag1);
23 23
24 $tag2 = new Tag(); 24 $tag2 = new Tag();
25 $tag2->setLabel('bar'); 25 $tag2->setLabel('bar');
@@ -35,6 +35,13 @@ class LoadTagData extends AbstractFixture implements OrderedFixtureInterface
35 35
36 $this->addReference('baz-tag', $tag3); 36 $this->addReference('baz-tag', $tag3);
37 37
38 $tag4 = new Tag();
39 $tag4->setLabel('foo');
40
41 $manager->persist($tag4);
42
43 $this->addReference('foo-tag', $tag4);
44
38 $manager->flush(); 45 $manager->flush();
39 } 46 }
40 47