5
In the booklets I read and tutorials I accompanied the Criteria is more used, but I identified more with HQL. But I have the following doubt, all that is done with Criteria it is possible to do with HQL?
Example HQL:
//Select * from Suspensao
@NamedQueries({
@NamedQuery(name = "Suspensao.listar", query = "SELECT suspensao FROM Suspensao suspensao") })
And then on the DAO:
Query consulta = sessao.getNamedQuery("Suspensao.listar");
lista = consulta.list();
Got it, thank you very much for the explanation
– DiegoAugusto