aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-11 16:30:01 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-11 16:30:01 +0200
commit88e88016b9a86d76940082b62c85c3756f461cb2 (patch)
tree43054fdd7f15e11d681970dfb692b269fbf6b705 /src/Wallabag/ImportBundle/Import/ReadabilityImport.php
parent58fadbc9df3f8b735c04995919b6cf913ca6a977 (diff)
downloadwallabag-88e88016b9a86d76940082b62c85c3756f461cb2.tar.gz
wallabag-88e88016b9a86d76940082b62c85c3756f461cb2.tar.zst
wallabag-88e88016b9a86d76940082b62c85c3756f461cb2.zip
Clearing entities in the loop fail on Postgres
It looks like when you clear entities on Postgres some references are lost and tags are not saved :-/
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/ReadabilityImport.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/ReadabilityImport.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
index 7bae647d..c7cfe15d 100644
--- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
+++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php
@@ -169,14 +169,11 @@ class ReadabilityImport extends AbstractImport
169 // flush every 20 entries 169 // flush every 20 entries
170 if (($i % 20) === 0) { 170 if (($i % 20) === 0) {
171 $this->em->flush(); 171 $this->em->flush();
172
173 // clear only affected entities
174 $this->em->clear(Entry::class);
175 $this->em->clear(Tag::class);
176 } 172 }
177 ++$i; 173 ++$i;
178 } 174 }
179 175
180 $this->em->flush(); 176 $this->em->flush();
177 $this->em->clear();
181 } 178 }
182} 179}