我如何通过它们的列表过滤掉一些实体,我尝试了以下方法,但我无法解析属性:实体:MyEntity:
public List getEntities(Set<MyEntity> blockedEntities) {
Session session = getCurrentSession();
Criteria crit = session.createCriteria(MyEntity.class, "entity");
crit.add(Restrictions.not(Restrictions.in("entity", blockedEntities)));
return (ArrayList<MyEntity>) crit.list();
}