bonjour mon probleme c'est que j'arrive pas a faire une methode qui recoi des paramettre pour chercher dans ma base avec hebernate voila mon code
methode
----------
public List RechercheAvancer(Integer id,Integer ncategorie) {
try {
List results = getSession()
.createQuery("from Vehicule where Nvehicule = :"+id+"and Ncategorie = :"+ncategorie).list();
return results;
} catch (RuntimeException re) {
throw re;
}
}
erreur
_____
org.hibernate.hql.ast.QuerySyntaxException: expecting IDENT, found '1' near line 1, column 44 [from Vehicule.Vehicule where Nvehicule = :1and Ncategorie = :2]
1 et 2 se sont les paramettre recu par la methode:
Partager