I would like two solutions to this question, one using a normal typedquery and another using the criteria because of its great versatility for the code.
Here is my query:
TypedQuery<Pessoa> query = em.createQuery("SELECT a FROM Pessoa a where
a.dataNascimento <> '12/9/2000'", Pessoa.class);
How do I return this query?
Here is the error:
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.time.LocalDate