Let's say I have a Person with a name and a birth date. Entity model is as follow :
@Entity
public class Person {
private int id;
private String name;
private LocalDate birthDate;
// constructors, getters and setters...
}
With the JPA Console, I would like to write a query like this :
@Query("select p from Person p where p.birthDate between :start and :stop")
List<Person> getPeopleBornBetween(LocalDate start, LocalDate stop);
If I try the query as it is and write the date between ' , parameters do not match expected type.
I cannot use Local.parse(...) in the parameters popup window neither in the console.
I also cannot use p.birthDate.format(...) in the console.
What should I do ?