mirror of
https://github.com/doctrine/orm.git
synced 2026-04-24 06:58:19 +02:00
DDC-2839: [GH-869] Detach objects in original object data #3545
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 4, 2013).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of tomphp:
Url: https://github.com/doctrine/doctrine2/pull/869
Message:
The PR makes Doctrine ORM update the database when you execute something like this:
The reason this doesn't work currently is because the array of original data stored in the UnitOfWork contains the actual DateTime object which is in the entity. When you update the object in the entity the original data is updated also so the entity are the original value are still equal and therefore the object is not seen as changed.
I have chosen to clone all objects rather than just DateTime object include more types are included in the future.
@doctrinebot commented on GitHub (Dec 5, 2013):
Comment created by @doctrinebot:
A related Github Pull-Request [GH-869] was closed:
https://github.com/doctrine/doctrine2/pull/869
@doctrinebot commented on GitHub (Aug 18, 2014):
Issue was closed with resolution "Invalid"