-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
[RFC] "Nested" calls to DocumentManager::flush() #1051
Comments
I'd like to see this change, as this would prevent me from a lot of trouble 👍 |
I remember using this to flush single document during bigger flush and nothing bad happened to me in the meantime |
Let's say there is an event subscriber that listens to the |
I'm not saying it can't break, just throwing my 2 cents saying that I'm currently using flush within a flush :) |
Ah, sorry :) |
Long time no see - just referencing the comments over in the ORM repository:
Given that, I'd try to come up with a solution for 2.0 along with a deprecation notice for 1.2. |
#1722 prevents user from flushing more than once at a time |
Hello all,
currently it is possible to
flush()
theDocumentManager
multiple times while it is already flushing. One example is a lifecycle event subscriber that calls some method that inserts another document and flushes theDocumentManager
.Currently, this case is not handled, the
DocumentManager
will happily run the nestedflush()
operation which can cause a bunch of issues. My suggestion is that theDocumentManager
prevents such calls, unless such functionality breaks existing behavior. Comments?The text was updated successfully, but these errors were encountered: