#206 - Added more projection examples in JPA.
Added another one that shows projections can be wrapped into an Optional.
This commit is contained in:
@@ -134,4 +134,9 @@ public class CustomerRepositoryIntegrationTest {
|
||||
|
||||
assertThat(page.getContent().get(0).getFirstname(), is("Carter"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void appliesProjectionToOptional() {
|
||||
assertThat(customers.findOptionalProjectionByLastname("Beauford").isPresent(), is(true));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user