aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/WallabagImport.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-25 11:26:15 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-25 12:03:49 +0200
commit401135852c6b25c8d5ab97beaefb02d1bd023ec9 (patch)
tree5922f4bd40af0ceb61db2c55755bc006f18410fb /src/Wallabag/ImportBundle/Import/WallabagImport.php
parentfaa86e06ba3032fdb98f3c0f79c72e8581d3c96f (diff)
downloadwallabag-401135852c6b25c8d5ab97beaefb02d1bd023ec9.tar.gz
wallabag-401135852c6b25c8d5ab97beaefb02d1bd023ec9.tar.zst
wallabag-401135852c6b25c8d5ab97beaefb02d1bd023ec9.zip
Use scheduled entity insertions to avoid tag duplicate
Using `getScheduledEntityInsertions()` we can retrieve not yet flushed but already persisted entities and then avoid tags duplication on import.
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/WallabagImport.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagImport.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Wallabag/ImportBundle/Import/WallabagImport.php b/src/Wallabag/ImportBundle/Import/WallabagImport.php
index 043bb0a2..3754e4a9 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagImport.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagImport.php
@@ -111,7 +111,8 @@ abstract class WallabagImport extends AbstractImport
111 if (array_key_exists('tags', $data)) { 111 if (array_key_exists('tags', $data)) {
112 $this->contentProxy->assignTagsToEntry( 112 $this->contentProxy->assignTagsToEntry(
113 $entry, 113 $entry,
114 $data['tags'] 114 $data['tags'],
115 $this->em->getUnitOfWork()->getScheduledEntityInsertions()
115 ); 116 );
116 } 117 }
117 118