[TYPO3-mvc] Problems with clearing an ObjectStorage

Claus Due claus at wildside.dk
Thu Jun 23 09:38:10 CEST 2011


Hi Sebastian,

You must repository->update($item) afterwards.

--

Med venlig hilsen / Kind regards

Claus Due
Code Monkey
--
Wildside A/S
Katrinebjergvej 113, DK-8200 Århus N
tlf. 86 12 64 65
http://www.wildside.dk

On Jun 23, 2011, at 9:09 AM, Sebastian Michaelsen wrote:

> 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.
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list