Okay, after many trial and error I have finally come up with the exact criteria.... but indeed it does not work :(
This is a simplified query, but this is to display my example. Also I was unable to rerieve my entire MaiLog object, so I have to do it with projections, which in the end gives you an array in return with the fields you specify in the projectionlist.
Code:
Object[] entry = session.createCriteria(MailLog.class).setProjection(
Projections.projectionList().add(Projections.alias(Projections.count("rcptAddress"), rcptCount")))
.add(Restrictions.ge("acceptedTime", beginDate))
.add(Restrictions.le("acceptedTime", endDate))
.add(Restrictions.ge("rcptCount", softBounceLimit)).list();
So this is not allowed!!
however this is(also listed in the reference, but I assumed that it was also possible for restrictions, since the reference is not exhaustive).
Code:
Object[] entry = session.createCriteria(MailLog.class).setProjection(
Projections.projectionList().add(Projections.alias(Projections.count("rcptAddress"), rcptCount")))
.add(Restrictions.ge("acceptedTime", beginDate))
.add(Restrictions.le("acceptedTime", endDate))
.addOrder(Order.asc("rcptCount")).list();
Is this going to be supported? or am i doing something wrong??
with kind regards,
Daniel