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