File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,6 +151,8 @@ function ($translation) use ($locale) {
151151 }
152152 }
153153
154+ $ storage ->flushAll ();
155+
154156 $ this ->output ->writeln ('<info>DONE</info> ' );
155157 }
156158 }
Original file line number Diff line number Diff line change @@ -102,11 +102,19 @@ public function deleteTranslation($id)
102102 public function persist ($ entity )
103103 {
104104 $ this ->manager ->persist ($ entity );
105- $ this ->manager ->flush ();
106105
107106 return $ entity ;
108107 }
109108
109+ /**
110+ * {@inheritdoc}
111+ */
112+ public function flushAll ()
113+ {
114+ $ this ->manager ->flush ();
115+ $ this ->manager ->clear ();
116+ }
117+
110118 /**
111119 * Delete an entity based on its identifier.
112120 *
@@ -151,4 +159,4 @@ abstract protected function getEntryClassName();
151159 * @return string
152160 */
153161 abstract protected function getTranslationClassName ();
154- }
162+ }
Original file line number Diff line number Diff line change @@ -104,4 +104,9 @@ public function deleteTranslation($id);
104104 * @return object
105105 */
106106 public function persist ($ entity );
107- }
107+
108+ /**
109+ * Flushes all persisted entities, and clear the object manager
110+ */
111+ public function flushAll ();
112+ }
You can’t perform that action at this time.
0 commit comments