1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| // Ajout des jointures sur d'autres tables
Criteria vCrit = getSession().createCriteria(HbPoste.class);
vCrit.setFetchMode("histoPosteZgs", FetchMode.JOIN);
//BLOC 1
//Criteria vCritHistoPoste = vCrit.createCriteria("histoPosteZgs");
//vCritHistoPoste.add(Expression.neProperty("id", "id"));
vCrit.add(Expression.or(Expression.gt("pceDateFin", vDateDuJour), Expression
.isNull("pceDateFin")));
//BLOC 2
/* vCrit.add(Expression.and(Expression.or(
Expression.gt("pceDateFin", vDateDuJour), Expression.isNull("pceDateFin")),
Expression.neProperty("histoPosteZgs.id.poste.id", "id")));
*/ |
Partager