title: JPA Hibernate bulk/batch update in Spring MVC
body: <p>I am new to Spring MVC and not much idea with JPA as well. all I want to do is to update a list of records and its working well when I loop through the list and call update on DAO. </p>
  
  <p>But I dnt want to perform 100 update/insert operations or DB round trips.</p>
  
  <p>Could any one please show me how to update around 100 records with batch update instead of doing the following:</p>
  
  <pre><code>Controller:
      List&lt;MyEntity&gt; list = form.getList();
      for(MyEntity e : list){
          dao.update(e);
      }
  
  Dao:
      public T update(T entity){
           entityManager.merge(entity);        
      }
  </code></pre>
  
  <p>Is it possible, if someone could provide me a simple way to perform batch update. I would really appreciate if I get as much explaination as possible.</p>
  
  <p>Thanks</p>