Skip to content

Commit e8058f5

Browse files
committed
Mark delete(Specification) as transactional method.
Override readOnly to false. Closes #3499
1 parent 9e87729 commit e8058f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ private String getCountQueryString() {
166166
return getQueryString(countQuery, entityInformation.getEntityName());
167167
}
168168

169-
@Transactional
170169
@Override
170+
@Transactional
171171
public void deleteById(ID id) {
172172

173173
Assert.notNull(id, ID_MUST_NOT_BE_NULL);
@@ -468,6 +468,7 @@ public boolean exists(Specification<T> spec) {
468468
}
469469

470470
@Override
471+
@Transactional
471472
public long delete(Specification<T> spec) {
472473

473474
CriteriaBuilder builder = this.entityManager.getCriteriaBuilder();

0 commit comments

Comments
 (0)