title: ORM/Doctrine2 - When to persist?
body: <p>This has been bugging me for a while.
  In Doctrine2, we have the:  <code>ObjectManager</code> function:</p>
  
  <pre><code>void persist(object $object = null)
  </code></pre>
  
  <p>You only need to call it on new entities.</p>
  
  <p>My question though, is "when" should it be called?  Immediately after creating the entity, or immediately before flushing it?</p>
  
  <p>I can't find any documentation indicating the convention.  The reason this is important is because Doctrine dispatches the "persist event" when calling.</p>
  
  <p>Given that the object might still be empty, it seems to imply that any functionality tagged on to that event should disregard the importance of the data the object contains at that point in time.</p>
  
  <p>Am I correct in that statement or is there a convention Doctrine promotes?</p>