Bug #56601

Major Feature #56602: Handling Of Multi Identity Entities

PersistenceManager wrong handling of ORM\Id

Added by Carsten Bleicker over 1 year ago. Updated 6 months ago.

Status:Under Review Start date:2014-03-06
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:Git 2.0

Description

Having this to make id unique in combination with workspace to have client entities (in german it calls "mandantenfähig"):
https://gist.github.com/pumatertion/9388169#file-cliententity-php-L22
https://gist.github.com/pumatertion/9388169#file-cliententity-php-L29

Doctrine allows composite keys: http://docs.doctrine-project.org/en/2.0.x/tutorials/composite-primary-keys.html
Wich is the sample above.

The PerstistenceManager having getIdentifierByObject() but this result is not usable by getObjectByIdentifier()
for entities having composite primary keys.

See comments:
https://gist.github.com/pumatertion/9388169#file-persistencemanager-php-L184
https://gist.github.com/pumatertion/9388169#file-persistencemanager-php-L222

Imho there is no need to manipulate the results of doctrine in the persistence. This is "just persistence"
if identifier is an array wich x or y items has to be handled somewhere else as in the persistence. this should be realy get
removed from the persistence layer.

To use Flow "fearless" its essential for me that doctrine persistence delivers expected results as doctrine documented it and does not any manupalation of datatypes, like the current() did it in https://gist.github.com/pumatertion/9388169#file-persistencemanager-php-L200.
Currently features of Doctrine are reduces by Flows PersistenceManager.

To receive third party data wich needs to be stored with client AND id information, f.e. to handle a multiclient rest api deals with the clientside identity flow makes realy problems doing this because you expect that doctrine persistence acts like doctrine, but it doesnt. But thats exactly what is Flow build for, i think.

Do you aggree?

Kind Regards
carsten bleicker

History

#1 Updated by Christian Müller over 1 year ago

  • Parent task set to #56602

#2 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 4 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26737

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/26737

#4 Updated by Gerrit Code Review 8 months ago

Patch set 6 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/26737

#5 Updated by Gerrit Code Review 6 months ago

Patch set 7 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/26737

#6 Updated by Gerrit Code Review 6 months ago

Patch set 8 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/26737

Also available in: Atom PDF