[TYPO3-mvc] Changes were applied without calling update()

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Jun 25 14:30:05 CEST 2010


Hi,

> i stumbled into a strange behaviour.
>
> I thought, that extbase just writes changes made on a object when the
> corresponsing repositories update() method is called.
>
> Today i noticed, that it is enough, if you fetch a object and call a
> setter. Is this behaviour intended?

yes - that's what persistence is about. You have to use a clone of your 
object if you manipulate it but don't want the changes to get persisted.

Calling repository methods is for cases where you either like to add new 
objects, or worked with a clone and want to replace the original object 
with it.

HTH.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list