Bug #46883

Custom identifiers are not working anymore

Added by Bastian Waidelich over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2013-04-03
Priority:Must have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:Persistence
Target version:TYPO3 Flow Base Distribution - 2.0
PHP Version: Complexity:
Has patch:No Affected Flow version:Git 2.0

Description

https://review.typo3.org/#/c/18954/ introduced a regression that prevents entities with custom identifier columns to be working correctly.
The actual issue is probably, that the "PersistenceMagicAspect" introduces the "Persistence_Object_Identifier" even if the entity contains a custom identifier. By checking for that property first, PersistenceManager::getIdentifierByObject() will always return a UUID regardless of the actual identifier – breaking links and such.


Related issues

related to TYPO3.Flow - Bug #43192: findByIdentifier() for non-persisted objects not working ... Accepted 2012-11-21

Associated revisions

Revision cd38544b
Added by Bastian Waidelich over 2 years ago

[BUGFIX] Reintroduce support for entities with custom id properties

This adjusts the pointcut expressions of the PersistenceMagicAspect
to introduce UUID identifiers only to entities that do not contain custom
identifier properties (annotated with @ORM\Id).

This change also refactors the unit tests and adds functional tests for
the aspect.

Change-Id: I0da12aefeeaa0e92b48b85a79e774efa738a2e49
Fixes: #46883
Releases: master, 2.0

Revision 20270da5
Added by Bastian Waidelich over 2 years ago

[BUGFIX] Reintroduce support for entities with custom id properties

This adjusts the pointcut expressions of the PersistenceMagicAspect
to introduce UUID identifiers only to entities that do not contain custom
identifier properties (annotated with @ORM\Id).

This change also refactors the unit tests and adds functional tests for
the aspect.

Change-Id: I0da12aefeeaa0e92b48b85a79e774efa738a2e49
Fixes: #46883
Releases: master, 2.0

History

#1 Updated by Bastian Waidelich over 2 years ago

  • Subject changed from custom identifiers are not working anymore to Custom identifiers are not working anymore

#2 Updated by Bastian Waidelich over 2 years ago

  • Status changed from New to Accepted
  • Assigned To set to Bastian Waidelich

#3 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19532

#4 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19532

#5 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19532

#6 Updated by Gerrit Code Review over 2 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19532

#7 Updated by Gerrit Code Review over 2 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19532

#8 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19559

#9 Updated by Bastian Waidelich over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF