Allow empty Iterable arguments in JdbcAggregateTemplate again.
This also affects repositories since they delegate to the template. Closes #1401
This commit is contained in:
@@ -312,6 +312,21 @@ public class JdbcAggregateTemplateUnitTests {
|
||||
assertThat(all).containsExactly(alfred2, neumann2);
|
||||
}
|
||||
|
||||
@Test // GH-1401
|
||||
public void saveAllWithEmptyListDoesNothing() {
|
||||
assertThat(template.saveAll(emptyList())).isEmpty();
|
||||
}
|
||||
|
||||
@Test // GH-1401
|
||||
public void deleteAllWithEmptyListDoesNothing() {
|
||||
template.deleteAll(emptyList());
|
||||
}
|
||||
|
||||
@Test // GH-1401
|
||||
public void deleteAllByIdWithEmptyListDoesNothing() {
|
||||
template.deleteAllById(emptyList(), SampleEntity.class);
|
||||
}
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
private static class SampleEntity {
|
||||
|
||||
Reference in New Issue
Block a user