-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity scheduled for deletion and original entity retrieved from database points on the same object since 2.19.5 #11480
Comments
I think you mean 2.19.4 to 2.19.5 Cc @xificurk |
Yes indeed, corrected. |
Friendly ping @xificurk I still got the same result by upgrading to v3 and I can't find a way around the problem. FI, |
Hello, I'm sorry for the delayed response... Yes, reloading a deleted entity and getting a new fresh instance of it, was a bug that has been fixed by #11428 - see the discussion there and also previous reports of the same underlying problem #6123, #9463. As far as I can tell
I was not able to reproduce this problem. @AirBair Can you provide a failing test case demonstrating the problem with |
Hi @xificurk, Thanks for you reply, better late than never! When preparing a reproducer, I was able to target the problem a little better. For context of my use case, a form embedding a collection of children entity, like described here: https://symfony.com/doc/current/form/form_collections.html Here is a full reproducer : https://github.com/AirBair/doctrine-orm-reproducer Hope this helps. |
BC Break Report
Summary
Hi Doctrine team,
When upgrading from doctrine/orm 2.19.4 to 2.19.5, a behavior changed when retrieving an entity scheduled for deletion from the database before the actual flush.
Before 2.19.5, the entity scheduled for deletion and the entity retrieved from the database were 2 different objects with the previous state in the last one, which allowed us to know what was in the entity (e.g. the parent relation in my case), now it seems to be the same object.
It seems related to this PR : #11428. If I revert the changes locally, i got back the previous behavior.
Previous behavior
Current behavior
How to reproduce
Same result if using
$uow->getOriginalEntityData($entity)
instead of direct call to the database to retrieve original data.I've seen the issue #11448, but i don't think that's exactly the same problem.
Any toughts ?
The text was updated successfully, but these errors were encountered: