Oui ma fonction statique se trouve dans Marche. Cependant le principe de Hibernate c'est de tester les objets non ?
Ma premiere fonction me renvoie donc une liste de marche qui sont les objets que je ne veux pas dans mon résultats.
1 2 3 4 5 6 7 8
|
public static List<Marche> getAllMarcheByST(SousTraitant monST) {
Criteria c = HibernateUtil.createCriteria(CoefficientSousTraitant.class);
c.setProjection(Projections.property("marche"));
c.add(Restrictions.eq("sousTraitant", monST));
c.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);
return c.list();
} |
J'essaye donc dans ma fonction de faire un
c.add(Restrictions.not(Restrictions.in("?????",getAllMarcheByST(monST))))
Partager