[TYPO3-mvc] automatic persisting of changes in model: not intended!

Simon Schaufelberger (Schaufi) simonschaufi at guugelmail.de
Wed Mar 11 14:56:46 CET 2015


Hi,
I have a $userRepository and load the current logged in user with:

$this->user = $this->userRepository->findCurrentUser();

in my controller I assign:

$this->view->assign('user', $this->user);

to the view.

Now if I change a property before ($this->user->setXXX('asdf')), it will 
be persisted even though I never call:

$this->userRepository->update($this->user);

is this REALLY intended?

this is the method that is responsible for the persistence:

https://git.typo3.org/Packages/TYPO3.CMS.git/blob/refs/heads/TYPO3_4-7:/typo3/sysext/extbase/Classes/Persistence/Manager.php#l179
-- 
Regards, Schaufi


More information about the TYPO3-project-typo3v4mvc mailing list