[Flow] Converting Objects by additional identity does not work?

Carsten Bleicker carsten at bleicker.de
Wed Mar 5 13:12:20 CET 2014


Runnig a test in the frontend with a test action wich redirects me to the show action of a given artist works:

1.) $this->redirect('show',array('resource' => $foo)) results in:
http://development.artmanager.local/foo/artist/test/fc700953-8911-9432-542e-968b7bff43e3
Status 200

2.) $this->redirect('show',array('resource' => $foo->getForeignIdentity())) results in:
http://development.artmanager.local/foo/artist/test/5317133a3e1bb <-- foreignIdentity wich is also a @Flow\Identity
Status 500
#1297933823: Object with identity "5317133a3e1bb" not found.


Am 05.03.2014 um 12:14 schrieb Carsten Bleicker <carsten at bleicker.de>:

> hi folks,
> having an entity with the default flow persistence identity and also another identity:
> 
> // @Flow\Entity
> class Foo{
> 	
> 	/**
> 	* @var string
> 	* @Flow\Identity
> 	*/
> 	protected $foreignIdentity;
> 	
> }
> 
> 
> my routing:
> -
> 	name: 'Read Action with foreignIdentity as {foo}'
> 	uriPattern: 'rest/{foo}'
> 	httpMethods: ['GET']
> 	defaults:
> 		'@package':    'Foo.Bar'
> 		'@controller': 'Foo'
> 		'@action':     'read'
> 		'@format':     'json'
> 
> 
> I would expect that my controller receives the mapped entity, detected either by its foreignIdentity or by its flow_persistence_identifier.
> But only flow_persistence_identifier works.
> 
> Am i wron with my expectation?
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list