title: Difference between persistAndFlush and persist, flush
body: <p>I've created a Symfony project using Doctrine, and when I persist an entity in the database, I see that it saves twice. </p>
  
  <p>I have used both <code>persistAndflush()</code>, and <code>persist()</code> and <code>flush()</code> separately, but I don't understand the problem.</p>