Bug #29244

cloning models don't reset persistence identifier

Added by Torsten no-lastname-given about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Persistence
Target version:
-
Start date:
2011-08-25
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Adding cloned models to repository throws "SQLSTATE23000: Integrity constraint violation: 1062 Duplicate entry" Exception.

This solves the issue:

public function __clone() {
    $this->FLOW3_Persistence_Identifier = \TYPO3\FLOW3\Utility\Algorithms::generateUUID();
}

#1

Updated by Karsten Dambekalns about 10 years ago

That code should be part of the PersistenceMagicAspect and affect entities only.

#2

Updated by Mr. Hudson about 10 years ago

  • Status changed from New to Under Review

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

#3

Updated by Mr. Hudson about 10 years ago

Patch set 2 of change Ic1856a192dd9a0f6f189934480b44320d0222b70 has been pushed to the review server.
It is available at http://review.typo3.org/4596

#4

Updated by Mr. Hudson about 10 years ago

Patch set 3 of change Ic1856a192dd9a0f6f189934480b44320d0222b70 has been pushed to the review server.
It is available at http://review.typo3.org/4596

#5

Updated by Mr. Hudson about 10 years ago

Patch set 4 of change Ic1856a192dd9a0f6f189934480b44320d0222b70 has been pushed to the review server.
It is available at http://review.typo3.org/4596

#6

Updated by Mr. Hudson about 10 years ago

Patch set 5 of change Ic1856a192dd9a0f6f189934480b44320d0222b70 has been pushed to the review server.
It is available at http://review.typo3.org/4596

#7

Updated by Mr. Hudson about 10 years ago

Patch set 6 of change Ic1856a192dd9a0f6f189934480b44320d0222b70 has been pushed to the review server.
It is available at http://review.typo3.org/4596

#8

Updated by Christian Müller about 10 years ago

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

Also available in: Atom PDF