Feature #28486

Don't clone, use explicit change tracking instead

Added by Benjamin Eberlei over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2011-08-17
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
PHP Version:
Has patch:
Complexity:

Description

Currently the parameter converter uses "clone" to create copies of objects,

Much better would be to automatically set the change tracking to DEFERRED_EXPLICIT for all entities: http://www.doctrine-project.org/docs/orm/2.0/en/reference/change-tracking-policies.html

This would mean changes are only tracked when you explicitly call $em->persist(). You could then switch the implementation of the Doctrine Base Repository to not use ->merge, but ->persist.

This would greatly simplify the code and make it much more robust.


Subtasks

Feature #29037: Use annotation to mark entities as aggregate rootRejectedKarsten Dambekalns2011-08-17

Actions
Feature #29038: Set useful defaults for cascade attributes in DoctrineResolvedKarsten Dambekalns2011-08-17

Actions
Task #29039: Change default policy for Doctrine to DEFERRED_EXPLICITResolvedKarsten Dambekalns2011-08-17

Actions
Task #29040: Adjust documentation to new persistence behaviorResolvedKarsten Dambekalns2011-08-17

Actions

Related issues

Related to TYPO3.Flow - Bug #13324: It's not possible to update entities without repositoryResolvedKarsten Dambekalns2011-02-24

Actions

Also available in: Atom PDF