Bug #51236

Task #55953: Repair and streamline ValueObject support

ValueObject Identity generation broken in some cases

Added by Philipp Maier about 8 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
-
Target version:
-
Start date:
2013-08-21
Due date:
% Done:

100%

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

Description

Consider this example ValueObject with two attributes.

<?php
namespace Vendor\Package\Domain\Model;

use TYPO3\Flow\Annotations as Flow;

/**
 * @Flow\ValueObject
 */
class Test {

  /**
   * @var string
   */
  protected $prop1;

  /**
   * @var string
   */
  protected $prop2;

  /**
   * @param string $prop1
   * @param string $prop2
   */
  public function __construct($prop1, $prop2) {
    $this->prop1 = $prop1;
    $this->prop2 = $prop2;
  }

  // ...
}

$test1 = new Test('Name', '');
$test2 = new Test('', 'Name');

$test1 and $test2 will have the same Identity generated by the PersistenceMagicAspect::generateValueHash because the names of the attributes are not included in the hash.
Fixing this will probably break some stuff.

--
Please also regard https://review.typo3.org/#/c/11368/4 in that matter

#1

Updated by Gerrit Code Review about 8 years ago

  • Status changed from New to Under Review

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

#2

Updated by Gerrit Code Review about 8 years ago

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

#3

Updated by Gerrit Code Review about 8 years ago

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

#4

Updated by Gerrit Code Review about 8 years ago

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

#5

Updated by Gerrit Code Review about 8 years ago

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

#6

Updated by Gerrit Code Review about 8 years ago

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

#7

Updated by Adrian Föder over 7 years ago

  • Parent task set to #55953
#8

Updated by Gerrit Code Review over 7 years ago

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

#9

Updated by Gerrit Code Review almost 7 years 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/23241

#10

Updated by Gerrit Code Review almost 7 years ago

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

#11

Updated by Gerrit Code Review over 6 years ago

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

#12

Updated by Gerrit Code Review over 6 years ago

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

#13

Updated by Gerrit Code Review over 6 years ago

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

#14

Updated by Gerrit Code Review over 6 years ago

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

#15

Updated by Philipp Maier over 6 years ago

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

Also available in: Atom PDF