Bug #89777

Extbase objects retrieved from a fe_user session cannot be persisted in their Repository

Added by Christian Eßl 12 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-11-26
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Also available in: Atom PDF