Hi this is my first post. I hope you can help me. I tried to write this query in my javaEE application: public List<Fornitore> findByMaxOrdine(int maxordine) { Query query; query = em.createQuery("SELECT b FROM Fornitore b WHERE b.maxOrdini > maxordine"); query.setParameter("maxordine", maxordine); return query.getResultList(); }
When I try to run it this is the result:
Exception Description: Problem compiling [SELECT b FROM Fornitore b WHERE b.maxOrdini > maxordine][46, 55] The identification variable 'maxordine' cannot be used in conjunction with the > operator.[46, 55] The identification variable 'maxordine' is not defined in the FROM clause.
I can not understand why it does not work. Thanks for your help.
Aucun commentaire:
Enregistrer un commentaire