diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java index bb7f7ee334..cbd6552b1f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java @@ -174,8 +174,8 @@ private String getCountQueryString() { return getQueryString(countQuery, entityInformation.getEntityName()); } - @Transactional @Override + @Transactional public void deleteById(ID id) { Assert.notNull(id, ID_MUST_NOT_BE_NULL); @@ -476,6 +476,7 @@ public boolean exists(Specification spec) { } @Override + @Transactional public long delete(Specification spec) { CriteriaBuilder builder = this.entityManager.getCriteriaBuilder();