Bug #56573

Major Feature #56602: Handling Of Multi Identity Entities

Converting by Flow\Identity

Added by Carsten Bleicker over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Persistence
Target version:
-
Start date:
2014-03-05
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

i am receiving records from a third party by json rest api.
my entities getting a property $foreignIdentity wich is the id of third party.
i would expect that the converter finds these entities and converts them by any given identity.
maybe throw exception if its not unique. but it could be prevented by a unique constraint.

i would expect that 2.) works:

1.) http://acme.local/foo/fc700953-8911-9432-542e-968b7bff43e3
Status 200 and flow persistence identifier is converted to concrete object

2.) http://acme.local/foo/5317133a3e1bb <-- foreignIdentity wich is also a @Flow\Identity
Status 500
#1297933823: Object with identity "5317133a3e1bb" not found.

class looks like this:

// @Flow\Entity
class Foo{

/**
  • @var string
  • @Flow\Identity
    */
    protected $foreignIdentity;

}

my routing:
-
name: 'Read Action by property "foreignIdentity" or "flow_persistence_identifier" as {foo}'
uriPattern: 'foo/{foo}'
httpMethods: ['GET']
defaults:
'@package': 'Acme.Foo'
'@controller': 'Foo'
'@action': 'show'
'@format': 'json'

i dont want to bind the rest api to the flow persistence identifier because third party users should use their own identity in combination with their workspace as unique constraint over the fields foreignIdentity_workspace.

Also available in: Atom PDF