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

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Jul 21 22:02:33 CEST 2011


Hey,

> This _isDirty() method returns the 'isModified' property of the
> ObjectStorage. I just looked at the $newAllgemeineVoraussetzungen
> ObjectStorage object and it has its property 'isModified' set to
> 'false'.

that's what I feared. The easiest way to get your stuff working would be 
this:

$allgemeineVoraussetzungen = $antrag->getAllgemeineVoraussetzungen();
$allgemeineVoraussetzungen->removeAll($allgemeineVoraussetzungen);
$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.
$antrag->setAllgemeineVoraussetzungen($allgemeineVoraussetzungen);


It's not the nicest solution but should work for you until the dirty 
monitoring is working better.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list