[TYPO3-mvc] Cannot update a 1:n relation [BUG FOUND]

Franz Koch typo3.RemoveForMessage at elements-net.de
Mon Aug 16 11:57:25 CEST 2010


Hey Xavier,

> Found where the problem is.
>
> _isDiry('contact') always returns FALSE. I digged into the problem and
> found where the test fails:

I just had a look and digged into that issue. Seems like you found in 
fact the real cause of the problem.

...
> Test goes into if ($currentValue instanceof
> Tx_Extbase_Persistence_ObjectMonitoringInterface) but:
>
> - previousValue is an object => isDirty = FALSE
> - $currentValue is not dirty as the referenced object itself was not
> modified => isDirty = FALSE
> - both previous and current value have the same class!
>
> As test, I deactivated this test to use the "For all other objects we do
> only a simple comparison
>
> After that, my relation is properly updated. Can someone from Extbase
> team understands where the "real" error is?

That should be in fact the "real" cause of this error, but I'm not sure 
if a object comparison is the best solution here, because it had a 
reason why the Tx_Extbase_Persistence_ObjectMonitoringInterface has been 
introduced and the _isDirty method had been changed recently.
Doing the comparison as last step if everything else fails should be 
save I think, but I'll better double check that for possible side effects.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list