[TYPO3-mvc] Problems with clearing an ObjectStorage

Sebastian Michaelsen sebastian.gebhard at gmail.com
Thu Jun 23 09:09:48 CEST 2011


Hi Zalán,

thanks for your answer

> Why don't you replace your ObjectStorage with a new (empty) one?
>
> public function removeAllFavorites(){
> 	$this->favorites = new Tx_Extbase_Persistence_ObjectStorage()
> }
>
> Best regards,
> Zalán Somogyváry

If I do so, the favorites are not persisted. In this run 
$this->favorites is empty, but on the next run it's filled again.


More information about the TYPO3-project-typo3v4mvc mailing list