Hello,
Can anyone please convert the following hql query to the code format commented.
Code:
Query query = session.createQuery("select DISTINCT c.groupmembers.groups.groupId from Meetingmembers " +
"as c where c.meetings.meetingId = :UserId AND deleted != :deleted");
query.setLong("UserId", meetingId);
query.setBoolean("deleted", true);
List<Long> ll = query.list();
// Criteria crit = session.createCriteria(Meetingmembers.class, "meetings");
// crit.add(Restrictions.eq("deleted", false));
//
// Criteria subcrit1 = crit.createCriteria("meetings");
// subcrit1.add(Restrictions.eq("meetingId", meetingId));
//
// Criteria subcrit2 = crit.createCriteria("groupmembers");
//
// ProjectionList projections = Projections.projectionList();
// projections.add(Projections.property("groups"));
// subcrit2.setProjection(Projections.distinct(projections));
//
// List ll = subcrit2.list();