Bug #26159

PersistenceMagicAspect doesn't set unique identifier for value objects

Added by Christopher Hlubek over 4 years ago. Updated over 4 years ago.

Status:Resolved Start date:2011-04-20
Priority:Must have Due date:
Assigned To:Christopher Hlubek % Done:

100%

Category:Persistence
Target version:TYPO3 Flow Base Distribution - 1.0 beta 1
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

In change Ia8a607386d69b00183f4b20acd2823296a7cfdff the pointcut for the value hash generation was changed to before. With the current way of getting properties from the object, every value object gets the same identity. The aspect should consider the method arguments to calculate the value hash.

Associated revisions

Revision 0cd6cb2f
Added by Karsten Dambekalns over 4 years ago

[BUGFIX] Fix calculation of identifier for value objects

The generateValueHash advice is a before advice, thus it needs to use
the arguments given to __construct() for calculating the hash. This is
safe, since for value objects everything contributing to their value has
to be given as constructor arguments.

Cleans up the unit tests along the way.

Fixes: #26159
Change-Id: I8c113edd47fe2441f928ce19d7a0066356af3e12

History

#1 Updated by Karsten Dambekalns over 4 years ago

  • Category set to Persistence
  • Status changed from New to Accepted
  • Priority changed from Should have to Must have
  • Target version set to 1.0 beta 1

#2 Updated by Mr. Hudson over 4 years ago

Patch set 1 of change I8c113edd47fe2441f928ce19d7a0066356af3e12 has been pushed to the review server.
It is available at http://review.typo3.org/1772

#3 Updated by Karsten Dambekalns over 4 years ago

  • Status changed from Accepted to Under Review

#4 Updated by Karsten Dambekalns over 4 years ago

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

Also available in: Atom PDF