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) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -