java - Flushing in the repositories -


Most of the code shows me (spring), it seems that any call entityManager.flush () Is there a reason for this from a repository?

Yes, one reason is by default, flush () Before being done, or before a query is executed, it is called automatically, resulting in non-flick-induced modifications. So a clear flush () is not nearly needed

and it is a good thing to flush as much as possible, because the transaction is rolled back, Because it avoids execution of this query.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -