diff --git a/pom.xml b/pom.xml index 30029db989..5da39cd3f7 100755 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.springframework.data.build spring-data-parent - 3.5.0-M1 + 3.5.0-SNAPSHOT @@ -41,7 +41,7 @@ 5.0 9.1.0 42.7.4 - 3.5.0-M1 + 3.5.0-SNAPSHOT 0.10.3 org.hibernate @@ -173,6 +173,16 @@ + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + spring-milestone https://repo.spring.io/milestone 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 9f649069c2..a9044a8828 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 @@ -250,23 +250,23 @@ public void deleteAllByIdInBatch(Iterable ids) { // generate entity (proxies) without accessing the database. ids.forEach(id -> entities.add(getReferenceById(id))); deleteAllInBatch(entities); - } else { + return; + } - String queryString = String.format(DELETE_ALL_QUERY_BY_ID_STRING, entityInformation.getEntityName(), - entityInformation.getIdAttribute().getName()); + String queryString = String.format(DELETE_ALL_QUERY_BY_ID_STRING, entityInformation.getEntityName(), + entityInformation.getIdAttribute().getName()); - Query query = entityManager.createQuery(queryString); + Query query = entityManager.createQuery(queryString); - /* - * Some JPA providers require {@code ids} to be a {@link Collection} so we must convert if it's not already. - */ - Collection idCollection = toCollection(ids); - query.setParameter("ids", idCollection); + /* + * Some JPA providers require {@code ids} to be a {@link Collection} so we must convert if it's not already. + */ + Collection idCollection = toCollection(ids); + query.setParameter("ids", idCollection); - applyQueryHints(query); + applyQueryHints(query); - query.executeUpdate(); - } + query.executeUpdate(); } @Override