Fix Callback order.

This undos the changes to `JdbcAggregateTemplate` done by 7cf81ae.
Since we are in the RC phase I opt against trying to redo the refactoring

Closes #1924
This commit is contained in:
Jens Schauder
2024-10-29 09:03:37 +01:00
parent a351a66fcb
commit 49e343fe8a
2 changed files with 46 additions and 26 deletions

View File

@@ -95,6 +95,18 @@ class JdbcRepositoryIdGenerationIntegrationTests {
assertThat(immutableWithManualIdEntityRepository.findAll()).hasSize(1);
}
@Test // DATAJDBC-393
void manuallyGeneratedIdForSaveAll() {
ImmutableWithManualIdEntity one = new ImmutableWithManualIdEntity(null, "one");
ImmutableWithManualIdEntity two = new ImmutableWithManualIdEntity(null, "two");
List<ImmutableWithManualIdEntity> saved = immutableWithManualIdEntityRepository.saveAll(List.of(one, two));
assertThat(saved).allSatisfy(e -> assertThat(e.id).isNotNull());
assertThat(immutableWithManualIdEntityRepository.findAll()).hasSize(2);
}
private interface PrimitiveIdEntityRepository extends ListCrudRepository<PrimitiveIdEntity, Long> {}
private interface ReadOnlyIdEntityRepository extends ListCrudRepository<ReadOnlyIdEntity, Long> {}