mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 09:23:20 +02:00
State property not being updated on flush() #7066
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 @nathansalter on GitHub (Nov 1, 2022).
Bug Report
Summary
Basically, we've got a lot of entities in the DB, but sometimes the
stateproperty on some of these entities doesn't get updated onflush(). This has ended up with this code snippet being used in our application:This doesn't happen all the time, and only happens on the state property, not any of the others. I'm assuming that somewhere, the changeset is being recalculated before the changes are persisted, but I can't find any of our listeners which are doing this.
Current behavior
State property is not updated.
How to reproduce
This is why I've waited so long to report this, I've been completely unable to replicate this issue, printing out lines and running debug, but every time I've tried this it's worked. The problem is consistent, and happens when only the state is updated, rather than any other properties. Any clues as to what to look for or how to track down what's happening here would be really appreciated.
Expected behavior
State property is updated.