Skip to content
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

Fix(Doctrine Repository template)/Avoid potential double call in save method #1324

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

mano-lis
Copy link
Contributor

@mano-lis mano-lis commented Jun 13, 2023

Store the entity manager in a variable rather than calling getEntityManager() twice in case of persist + flush

@mano-lis
Copy link
Contributor Author

@dunglas

@mano-lis mano-lis changed the title Fix(Doctrine Repository template)/Avoid potential double call to in save method Fix(Doctrine Repository template)/Avoid potential double call in save method Jun 13, 2023
@weaverryan
Copy link
Member

Ok for me! FYI - we are planning to remove these methods, but until we do, this change is good. Thanks Emmanuel!

@weaverryan weaverryan merged commit a569c58 into symfony:main Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants