[FLOW3-general] Update multiple Objects

Thomas Rödiger tom at datenarbeit.de
Thu Jan 5 00:36:26 CET 2012


Hi,
I'm trying to find a way to update multiple objects/rows in one query. 
Using something like

while($stockItem=$this->stockItemRepository->findAll()->next()){
     $stockItem->setCount(0);
     $this->stockItemRepository->update($stockItem);
}

... is really an overkill.

What I'm looking for is something like:
Doctrine_Query::create()
             ->update('stockitem')
             ->set('count', '0')
             ->excute();

so whats the flow3 way to do this? I'didnt find anything.

thanks in advance,
thomas


More information about the FLOW3-general mailing list