title: doctrine save method update/insert based on unique field
body: <p>I read so many post and I found many variations about how to get save to insert vs update but couldn't find something that would work for me.</p>
  
  <p>I am guessing that preSave would be the way to go if preSave() is being executed automaticly by save() if present.</p>
  
  <pre><code>columns:
    email:
      type: string(255)
      unique: true
      email: true
  </code></pre>
  
  <p>I need save() to check if a filed is set to be unique
  if so, to check if field data in this case email address is unique.
  Based on that info decide to insert or update posted fields that have changed.</p>