[TYPO3-mvc] Removing Value objects won't work as expected...
Henjo Hoeksma
me at henjohoeksma.nl
Wed Apr 13 16:23:36 CEST 2011
Hi list,
this is the second time I run into this, and I have no clue why it goes wrong.
When updating a form (i.e. by an xml parser) I want to clear the
current attached value objects completely.
I try so doing:
<code>
$newRentOrder =
$this->rentOrderRepository->findByUid($arguments['rentOrderUid']);
// t3lib_div::debug(count($newRentOrder->getOrderedoptions()));
foreach($newRentOrder->getOrderedoptions() as $orderedOption){
// t3lib_div::debug($orderedOption);die();
$newRentOrder->removeOrderedoption($orderedoption); }
</code>
Everytime only half the value object get removed...
Any clue on why this is happening?
The count gives me the correct total of options.
Thanks,
Henjo
More information about the TYPO3-project-typo3v4mvc
mailing list