Je pense déjà utiliser les alias car ma requête est:
hql2 = "from Structure S0, Utilisateur C0, Affectation A0, Directory D0 where S0.id = A0.structure and A0.utilisateur = C0.id and A0.codeAction in ('A','M') and C0.id = D0.utilisateur and D0.base = 1 and D0.codeAction in ('A','M') and S0.id = 156 order by C0.nom";
mais j'ai toujours cette erreur:
org.hibernate.QueryException: could not resolve property: utilisateur of: ***.***.***.hibernate.Directory
alors que dans mon fichier de mapping, j'ai bien:
1 2 3 4 5 6
| <key-many-to-one
name="utilisateur"
class = "Utilisateur"
column="ID_COMPTE"
lazy="false"
/> |
Donc si j'ai bien compris je dois donc pouvoir faire appel à ça:
Partager