title: Symfony2 insert multiple entities
body: <p>I have a question about inserting multiple entities.
  What happens to the entities if i persist every entity in a loop and then i flush ? I mean what happens if one of this entities is duplicated and can't be inserted ? Are all entities removed or only the one which is duplicated ?</p>
  
  <pre><code>foreach($datas as $data) {
          $obj = new DataLerne();
          // Code ..
          $obj-&gt;setAtt($data['att']);
          $em-&gt;persist($obj);
  }
  $em-&gt;flush();
  </code></pre>
  
  <p>Thank you for your responses</p>