This is the error I believe is easy for those who handle Java but as I am learning I still have not identified the problem.
GRAVE: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: . near line 1, column 49 [select c from com.htcursos.model.entity.Cidade c.estado=:est]
Here's my CidadeDAO.java
@SuppressWarnings("unchecked")
public List<Cidade> buscarCidades(Estado estado) {
Query consulta = em.createQuery("select c from Cidade c.estado=:est");//JPQL
consulta.setParameter("est", estado);
return consulta.getResultList();
}
If this is not enough to solve the problem ask me for more information that I add to the post. All the help is much appreciated then Thank you in advance.
UPDATE: Error after inserted WHERE:
GRAVE: java.lang.IllegalArgumentException: org.hibernate.QueryException: Unable to resolve path [c.estado], unexpected token [c] [select c from com.htcursos.model.entity.Cidade where c.estado=:est]
Tables
City
Status