|
|
|
@ -1021,6 +1021,16 @@ class JdbcAggregateTemplateIntegrationTests { |
|
|
|
assertThat(template.save(entity).id).isNotNull(); |
|
|
|
assertThat(template.save(entity).id).isNotNull(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test // GH-1309
|
|
|
|
|
|
|
|
void updateIdOnlyAggregate() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WithIdOnly entity = new WithIdOnly(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(template.save(entity).id).isNotNull(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template.save(entity); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private <T extends Number> void saveAndUpdateAggregateWithVersion(VersionedAggregate aggregate, |
|
|
|
private <T extends Number> void saveAndUpdateAggregateWithVersion(VersionedAggregate aggregate, |
|
|
|
Function<Number, T> toConcreteNumber) { |
|
|
|
Function<Number, T> toConcreteNumber) { |
|
|
|
saveAndUpdateAggregateWithVersion(aggregate, toConcreteNumber, 0); |
|
|
|
saveAndUpdateAggregateWithVersion(aggregate, toConcreteNumber, 0); |
|
|
|
@ -1456,6 +1466,7 @@ class JdbcAggregateTemplateIntegrationTests { |
|
|
|
@Id Long id; |
|
|
|
@Id Long id; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
@Configuration |
|
|
|
@Import(TestConfiguration.class) |
|
|
|
@Import(TestConfiguration.class) |
|
|
|
static class Config { |
|
|
|
static class Config { |
|
|
|
|