[FLOW3-general] Bulk Updates with DQL
Karsten Dambekalns
karsten at typo3.org
Wed Nov 7 11:33:35 CET 2012
Hi.
On 06.11.12 11:03, David Sporer wrote:
> After each iteration I'm executing this - without it the memory usage
> increases too much.
>
> $globalPersistence = new
> \TYPO3\FLOW3\Persistence\Doctrine\PersistenceManager();
Ouch.
Please, use something like this instead:
----
/**
* @Flow\Inject
* @var \TYPO3\FLOW3\Persistence\Doctrine\PersistenceManagerInterface
*/
protected $persistenceManager;
…
$this->persistenceManager->persistAll();
$this->persistenceManager->clearState();
----
Regards,
Karsten
--
Karsten Dambekalns
TYPO3 Core Developer, Neos / Flow Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list