Open simbo1905 opened 1 week ago
If i add the following @Query
annotation:
@Query("SELECT new com.baeldung.jpa.projection.view.PersonDto(p.firstName, p.lastName) FROM Person p WHERE p.firstName = :firstName")
PersonDto findByFirstName(@Param("firstName") String firstName);
Then four out of the five failing test methods pass.
The article Introduction to Spring Data JPA which links to the code persistence-modules/spring-data-jpa-simple has a runtime bug.
Describe the Issue
Running all the tests has one failure for
JpaProjectionIntegrationTest
which is:To Reproduce
Steps to reproduce the behavior:
Expected Behavior
The test should pass.
Environment (please complete the following information):