title: Difference between save and saveAndFlush in Spring data jpa
body: <p>I am trying to learn spring data JPA by testing some CRUD operation via <code>JpaRepository</code>.</p>
  
  <p>I came across two methods <code>save</code> and <code>saveAndFlush</code>.
  I don't get the difference between these two. On calling <code>save</code> also my changes are getting saved into database so what is the use of <code>saveAndFlush</code>.</p>