Now I have a User class, I get request data arrayfrom jspor html.
list this Integer[] arr=[5,6,9,10,62,52,21]
and then I use two methods to complete the volume removal action.
@Transactional
@Override
public void deleteUser(Integer id) {
oneRepository.delete(id);
}
@Transactional
@Override
public void deleteSomeUser(Integer[] ids) {
for (Integer id : ids) {
deleteUser(id);
}
}
I want to know if this is a more efficient method to complete this action.
you can see my magazines: it seems not very good!
[94, 95, 91, 92, 93]
Hibernate:
delete
from
sshh_user
where
ID=?
Hibernate:
delete
from
sshh_user
where
ID=?
Hibernate:
delete
from
sshh_user
where
ID=?
Hibernate:
delete
from
sshh_user
where
ID=?
Hibernate:
delete
from
sshh_user
where
ID=?
Hibernate:
select
count(practice0_.ID) as col_0_0_
from
sshh_user practice0_
source
share