use of org.springframework.data.jdbc.core.mapping.AggregateReference in project spring-data-jdbc by spring-projects.
the class BasicRelationalConverterAggregateReferenceUnitTests method convertsToAggregateReference.
// DATAJDBC-221
@Test
public void convertsToAggregateReference() {
final RelationalPersistentProperty property = entity.getRequiredPersistentProperty("reference");
Object readValue = converter.readValue(23, property.getTypeInformation());
Assertions.assertThat(readValue).isInstanceOf(AggregateReference.class);
assertThat(((AggregateReference<DummyEntity, Long>) readValue).getId()).isEqualTo(23L);
}
Aggregations