批量操作

Condition接口提供了批量更新和根据查询条件删除的功能

  • 批量更新
  1. int count = dao.query(Person.class)
  2. .addQuery("username","quickdao")
  3. .addUpdate("password","123456")
  4. .execute()
  5. .update();
  • 批量删除
  1. int count = dao.query(Person.class)
  2. .addQuery("username","quickdao")
  3. .execute()
  4. .delete();