Bug #25902

It's not possible to add an entity as link/redirect argument

Added by Bastian Waidelich almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Must have
Category:
Persistence
Start date:
2011-04-12
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

It's very common to redirect to a details view after creating an entity:

public function createAction(Foo $foo) {
    $this->fooRepository->add($foo);
    $this->redirect('show', NULL, NULL, array('foo' => $foo))
}

But that won't work because the entity is not (yet) known to the Persistence Manager, which is asked for the identity of the object in the Route in order to convert Objects to Identity arrays:

...
if (is_object($routeValue)) {
    $uuid = $this->persistenceManager->getIdentifierByObject($routeValue);

...


Related issues

Related to TYPO3.Flow - Bug #25801: Request arguments should never contain objectsResolvedBastian Waidelich2011-04-06

Actions

Also available in: Atom PDF