wherehows-dao/src/main/java/wherehows/dao/table/BaseDao.java
@SneakyThrows
  public void updateList(List<? extends Object> records) {
    EntityManager entityManager = entityManagerFactory.createEntityManager();
    entityManager.getTransaction().begin();
    try {
      for (Object record : records) {
        entityManager.merge(record);
        entityManager.flush();
      }
      entityManager.getTransaction().commit();
    } finally {
      entityManager.close();
    }
  }
/**
   * Update/merge a list of entity records.
   * @param records a list of entity objects
   */
Update/merge a list of entity records.
@param records a list of entity objects
Update / merge a list of entity records . @param records a list of entity objects
@SneakyThrows
  public void updateList(List<? extends Object> records) {
    EntityManager entityManager = entityManagerFactory.createEntityManager();
    entityManager.getTransaction().begin();
    try {
      for (Object record : records) {
        entityManager.merge(record);
        entityManager.flush();
      }
      entityManager.getTransaction().commit();
    } finally {
      entityManager.close();
    }
  }
@ SneakyThrows public void updateList ( List < ? extends Object > records ) { EntityManager entityManager = entityManagerFactory . createEntityManager ( ) ; entityManager . getTransaction ( ) . begin ( ) ; try { for ( Object record : records ) { entityManager . merge ( record ) ; entityManager . flush ( ) ; } entityManager . getTransaction ( ) . commit ( ) ; } finally { entityManager . close ( ) ; } }
Update/merge a list of entity records.
Update / merge a list of entity records .