#89777Extbase objects retrieved from a fe_user session cannot be persisted in their Repository
Description
How to reproduce:
- Save an extbase model object in the fe_user session:
$GLOBALS['TSFE']->fe_user->setKey('ses', 'sessionname', $foo);
- Now retrieve the object from the session:
$foo = $GLOBALS['TSFE']->fe_user->getKey('ses', 'sessionname');
- A complete extbase model object will now be retrieved. However if you use the “update” method of the Repository, the call will fail with the exception:
$fooRepository->update($foo);
The object of type "Foo" given to update must be persisted already, but is new.
If you call _isNew() on the object from the session, it will return false.