Answer the question
In order to leave comments, you need to log in
What is the meaning of flushAutomatically=true with the Modyfying annotation?
For example, @Modifying(flushAutomatically = true).
I understand that its meaning is to dump the entire cache into the database before executing the request.
But when we write an @Query query, doesn't JPA already deal with it? And by default, JPA has Flushmode = AUTO.
Shouldn't it flush the cache to the database before executing the query and without this annotation?
I'll be glad to answer, because I'm a little confused.
PS If my reasoning is correct, then using hibernate I can safely not specify flushAutomatically=true?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question