What is the simplest way of declaring a Spring data JPA query that uses properties of an input parameter as query parameters?
For example, suppose I have an entity c
This link will help you: Spring Data JPA M1 with SpEL expressions supported. The similar example would be:
@Query("select u from User u where u.firstname = :#{#customer.firstname}")
List findUsersByCustomersFirstname(@Param("customer") Customer customer);
https://spring.io/blog/2014/07/15/spel-support-in-spring-data-jpa-query-definitions