1
I would like two solutions to this question, one using a normal typedquery and the other using the criteria due to its great versatility for code.
Here is my query:
TypedQuery<Pessoa> query = em.createQuery("SELECT a FROM Pessoa a where
a.dataNascimento <> '12/9/2000'", Pessoa.class);
how to return this query?
Here is the mistake:
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.time.LocalDate
You yourself have already given the solution with
TypedQuery
in your question. It means that you only want the solution withCriteria
? Or for some reason you also want something more withTypedQuery
that is not what you already gave in the question?– Victor Stafusa
@Victorstafusa The problem is that when I run this query it gives an error !!
– Pena Pintada
Which error? Put the error in the question.
– Victor Stafusa