Skip to content

Commit e96fa55

Browse files
committed
Mark delete(Specification) as transactional method.
Override readOnly to false. Closes #3499
1 parent 3132e02 commit e96fa55

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ private String getCountQueryString() {
174174
return getQueryString(countQuery, entityInformation.getEntityName());
175175
}
176176

177-
@Transactional
178177
@Override
178+
@Transactional
179179
public void deleteById(ID id) {
180180

181181
Assert.notNull(id, ID_MUST_NOT_BE_NULL);
@@ -476,6 +476,7 @@ public boolean exists(Specification<T> spec) {
476476
}
477477

478478
@Override
479+
@Transactional
479480
public long delete(Specification<T> spec) {
480481

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

0 commit comments

Comments
 (0)