-
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
UnitOfWork pre update invoke causes some times fatal errors #5605
Comments
@sr-amueller the initial issue ( #3468 ) was closed due to lack of tests: can you reproduce the issue in isolation? |
@Ocramius Not right now, but I will try to reproduce it the issue in isolation in the next few days. |
@sr-amueller thanks :-) |
In my case the problem was, |
I think this might happen when
As commented in 86cde3a that fix leads to another error. Aside: I'm wondering why the preUpdate event occurs during the flush whereas prePersist und preRemove occur immediately when |
I still got this error Argument 3 passed to Doctrine\ORM\Event\PreUpdateEventArgs::__construct() must be of the type array, null given, called in UnitOfWork.php on line 1060 In controller
Inside my service:
Please suggest. |
Flushing inside a flush operation is not supported, so that scenario is pretty much invalid. |
Hello @Ocramius thanks, but i did not understand |
@apoorva-shah You can read http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html for more information. |
I've the same problem like described in #3468. Somehow the change set for the entity is gone while calling the commit function. I guess it will work if one changes the following line of code.
To use the method "getEntityChangeSet" to force to get an array. Because it does the same like before in a cleaner manner and one will always get an array back.
(https://github.com/doctrine/doctrine2/blob/16972935917307c49c6a423edcc1fbb711e0d483/lib/Doctrine/ORM/UnitOfWork.php#L1052)
This is my first ticket creation for the doctrine2 project, I hope it will help to improve the project.
The text was updated successfully, but these errors were encountered: