[FLOW3-general] Bulk Updates with DQL

David Sporer david.sporer at gmail.com
Wed Nov 7 12:51:17 CET 2012


Ouh...
That happens if you copy & paste without thinking :-)
http://lists.typo3.org/pipermail/flow3-general/2011-December/001684.html

Thanks.


2012/11/7 Karsten Dambekalns <karsten at typo3.org>

> 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
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
>


More information about the FLOW3-general mailing list