#201 - Added example for constructor expression in JPA projections.
This commit is contained in:
@@ -117,6 +117,15 @@ public class CustomerRepositoryIntegrationTest {
|
||||
assertThat(((TargetAware) projectedDave).getTarget(), is(instanceOf(Map.class)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void projectsDtoUsingConstructorExpression() {
|
||||
|
||||
Collection<CustomerDto> result = customers.findDtoWithConstructorExpression("Dave");
|
||||
|
||||
assertThat(result, hasSize(1));
|
||||
assertThat(result.iterator().next().getFirstname(), is("Dave"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void supportsProjectionInCombinationWithPagination() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user