diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-25 11:26:15 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-25 12:03:49 +0200 |
commit | 401135852c6b25c8d5ab97beaefb02d1bd023ec9 (patch) | |
tree | 5922f4bd40af0ceb61db2c55755bc006f18410fb /src/Wallabag/ImportBundle/Import/WallabagImport.php | |
parent | faa86e06ba3032fdb98f3c0f79c72e8581d3c96f (diff) | |
download | wallabag-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.php | 3 |
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 | ||