[TYPO3-mvc] Persistence/ObjectStorage: Model seems to be unimpressed by modifying its properties

Hauke Stange hstange at eheundjanneck.de
Fri Jul 22 13:09:56 CEST 2011


Hi Franz,

thanks again for your help.

> The easiest way to get your stuff working would be 
> this:
> 
> [1] $allgemeineVoraussetzungen = $antrag->getAllgemeineVoraussetzungen();
> [2] $allgemeineVoraussetzungen->removeAll($allgemeineVoraussetzungen);
> [3] $allgemeineVoraussetzungen->addAll($newAllgemeineVoraussetzungen);
> // the following line is currently optional, unless your Antrag object
> // doesn't return a cloned objectStorage. But it doesn't harm to have
> // either.
> [4] $antrag->setAllgemeineVoraussetzungen($allgemeineVoraussetzungen);

...but unfortunately it's not working right also.

[1] Gets me an object storage with two entries.

[2] After removeAll() is called (only) one of those entries is removed.
    If I call removeAll() subsequently the other entry is removed also.
    What's that about? Why aren't all entries removed at once?

[3] + [4] Attaching new object storages functions properly.

Why is Extbase so nasty to me?!






More information about the TYPO3-project-typo3v4mvc mailing list