[TYPO3-mvc] Modifies objects inside objectStorages don't seem to get persisted

Franz Koch typo3.RemoveForMessage at elements-net.de
Mon Jan 10 02:46:49 CET 2011


Hey folks,

anybody else noticed issues with modified objects (non aggreateRoots/no 
repository for those objects) inside objectStorages not beeing 
persisted? The issue seems related to the fact, that the _isDirty method 
of objectStorages is only tracking changes to the storage itself 
(add/remove items), but doesn't take changes in child objects into account.

Unfortunately we can't easily iterate over the child objects and trigger 
their _isDirty method, because you could run into endless recursions if 
the child object has a back reference to it's parent - and implementing 
some sort of register of already checked objects doesn't feel right to me.

Any idea on how to solve this? Iterate over objects inside the 
identityMap instead of just aggregate roots? I know there's work beeing 
done in changing the _isDirty stuff to some nicer solution, but AFAIK 
the refactoring doesn't treat this issue yet.
-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list