mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
GetEntityChangeSet for Custom Mapping Type get unchanged items #5902
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 @myspulin on GitHub (Feb 26, 2018).
Originally assigned to: @Ocramius on GitHub.
Hi,
I use Custom Mapping Type for my entity (ENUM). When I try to call GetEntityChangeSet when onFlush called, I get the same value even if entity did not changed.
I use
doctrine/orm: v2.5.14This is the result, both values are the same:
Also SQL update is called but it is not necessary to do that if no changes have made:
Could you please check this issue, thank you!
@Ocramius commented on GitHub (Feb 26, 2018):
The
DocumentVisibilityinstances are compared by reference (like all objects), so this is expected behavior.See also https://stackoverflow.com/questions/15486402/doctrine2-orm-does-not-save-changes-to-a-datetime-field for another example of how this could go wrong.
@myspulin commented on GitHub (Feb 27, 2018):
Make sense, thanks for info.