I'm trying to create some sort of queries with JPA's Criteria instead of hibernate, but I'm having some difficulties;
I would do so if I were to use hibernate;
if (filtro.getEstado() != null) {
criteria.add(Restrictions.eq("estado", filtro.getEstado()));
}
As I will not use hibernate and yes, I will use JPA I tried to do so more is generating error as you can see in the figure below:
I'vetriedeveryway,ifyouwanttoshowhowItried,I'mgoingtoneedtosetupthequeryright.
Hereismyrepository:
CLICK HERE