pessoal nao sei oq pode esta dando esse erro alguem pode me ajudar,fiz uma funcao q retorna un List, justamente nesse List onde esta a query,pq essa funcao e so pra verificar c existe dados,em outra classe vejo o List.size() c for > q 0,tem dados senao nao tem blz a funcao esta aki
public List existeDados(Object o1,Object o2,Object o3,Object o4)
{
String query = "from tabela t " +
" where t.campo1= :campo1" +
" and t.campo2 = :campo2" +
" and t.campo3 = :campo3" +
" and t.faixa = :faixa ";
return (List) getSession().createQuery(query).setParameter("campo1",o1.getObejct1()).setParameter("campo2",o2.Object()).setParameter("campo3",o3.Object()).setParameter("faixa",o4.getFaixa()).list();
}
da esse erro
Exception in thread "AWT-EventQueue-1" org.hibernate.QueryException: could not resolve property: faixa of: com.trabalho.Projeto.db.tabela [where t.campo1 = :campo1 and t.campo2 = :campo2 and t.campo3 = :campo3 and t.faixa = :faixa ]