Skip to content

Commit ea26b53

Browse files
koval666schauder
authored andcommitted
Add Transactional annotation to deleteAllById.
Original pull request #1370
1 parent 670ce0e commit ea26b53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepository.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
* @author Jens Schauder
3535
* @author Oliver Gierke
3636
* @author Milan Milanov
37+
* @author Chirag Tailor
38+
* @author Diego Krupitza
39+
* @author Dmitriy Kovalenko
3740
*/
3841
@Transactional(readOnly = true)
3942
public class SimpleJdbcRepository<T, ID> implements PagingAndSortingRepository<T, ID> {
@@ -138,10 +141,7 @@ public void delete(T instance) {
138141
entityOperations.delete(instance, entity.getType());
139142
}
140143

141-
/*
142-
* (non-Javadoc)
143-
* @see org.springframework.data.repository.deleteAll#delete(java.lang.Iterable)
144-
*/
144+
@Transactional
145145
@Override
146146
public void deleteAllById(Iterable<? extends ID> ids) {
147147
ids.forEach(it -> entityOperations.deleteById(it, entity.getType()));

0 commit comments

Comments
 (0)