Skip to content

Commit bfed8c0

Browse files
koval666schauder
authored andcommitted
Add Transactional annotation to deleteAllById.
Original pull request #1370
1 parent 3c57ebf commit bfed8c0

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
@@ -35,6 +35,9 @@
3535
* @author Jens Schauder
3636
* @author Oliver Gierke
3737
* @author Milan Milanov
38+
* @author Chirag Tailor
39+
* @author Diego Krupitza
40+
* @author Dmitriy Kovalenko
3841
*/
3942
@Transactional(readOnly = true)
4043
public class SimpleJdbcRepository<T, ID> implements PagingAndSortingRepository<T, ID> {
@@ -153,10 +156,7 @@ public void delete(T instance) {
153156
entityOperations.delete(instance, entity.getType());
154157
}
155158

156-
/*
157-
* (non-Javadoc)
158-
* @see org.springframework.data.repository.deleteAll#delete(java.lang.Iterable)
159-
*/
159+
@Transactional
160160
@Override
161161
public void deleteAllById(Iterable<? extends ID> ids) {
162162
ids.forEach(it -> entityOperations.deleteById(it, entity.getType()));

0 commit comments

Comments
 (0)