Tuesday, July 8, 2008

Hibernate: detached criteria

DetachedCriteria dcSport = DetachedCriteria.forClass(PhraseSport.class);

    dcSport.add(Expression.eq("sport.id", phrase.getSportId()));

    List sports = hibernateList(dcSport);