title: Is it possible to get the ID of entity after persist and before Flush in Doctrine2?
body: <p>I have the <code>User</code> Login Registration Page.</p>
  
  <p>Now on the same Page i have one more Forms i.e <code>UserInterests</code>.</p>
  
  <p>Now i have the PostPersist function which creates new <code>UserProfile</code> after User is Persisted</p>
  
  <p>Now UserProfile is linked with User ID and <code>UserInterests</code> is linked with <code>UserProfile ID</code></p>
  
  <p>Now the client wants UserInterests on same User page but i have problem that UserProfile is not yet created. Now how can persist them. Is there any way</p>