-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Handle exceptions on entity flush #36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but… see question on the issue.
I've changed it as suggested to try/catch |
Gnah… |
Yep, that's all we get. 🤷♂️ |
@kitsunet What do you think? |
And the PHP version used for the tests needs to be raised… 🙈 |
I think we really shouldn't deal with te UOW at all, and need to refactor htis, but it's fine for me as a quick fix. |
by reading, I read the issues in doctrine and see how this works, not sure if there might be any side effects. |
67e138d
to
c7c8db4
Compare
c7c8db4
to
87783d7
Compare
Fixes #35
The entity states are changing during the single flushes of entities. And if we have to remove more than one entity this crashes now, due to the change in doctrine/orm.
In general I think we should get rid of the manually handling of entity persistance, as we can see in this case.
For now we check this state, before flushing to ensure, we do not try to flush a detatched entity.