Hi,
I've a problem while I'm trying to execute a query I need to do the following sql query within the use of criteria or hql
Code:
select affaire.nom, affaire.id ... from affaire, requerant, affaire_requerant where affaire_requerant.ref_affaire = affaire.id_affaire and affaire_requerant.ref_requerant = requerant.id_requerant and requerant.nom like '%Jaq%?
in my Affaire entity I've a set of Requerant declared
I first load all the requerant that meets the like clause and then try to use a
Code:
criteria.createCriteria(Affaire.class)
Criteria testMany = criteria.createCriteria("requerants");
testMany.add(Restrictions.in("id", getRequerantsArray());
criteria.list()
where getRequerantsArray return an array of id of the eligible requerant
any idea ?