Salut,
J ai un petit soucie avec une requête qui se base sur des crieria et utilise un like comme clause
voici mon code
ne me retourne pas la liste des bonnes valeures,
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 Criteria criteria = session.createCriteria(Commune.class); criteria.add(Expression.like("libelleFr", commune.getLibelleFr()));
le sql générer est le suivant
une piste ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6Hibernate: select this_.ID as ID3_1_, this_.district_ID as district5_3_1_, this_.LIBELLE_DE as LIBELLE2_3_1_, this_.LIBELLE_FR as LIBELLE3_3_1_, this_.N NUMERO3_1_, district2_.ID as ID2_0_, district2_.LIBELLE_DE as LIBELLE2_2_0_, district2_.LIBELLE_FR as LIBELLE3_2_0_, district2_.NUMERO as NUMERO2_0_ fr ne this_ left outer join District district2_ on this_.district_ID=district2_.ID where this_.LIBELLE_FR like ? LIST SIZE : 0
Partager