Hello every one, can someone could help me?
i have a problem while doing a sub query: here is the script :

DetachedCriteria subInfo = DetachedCriteria.forClass(ActReg.class)
.createAlias("ActType", "t")
.createAlias("Incident", "i")
.add(Restrictions.eq("t.Id", 158))
.setProjection(Projections.property("i.Id"));


Criteria critInfo = session.createCriteria(IncData.class)
.add(Restrictions.between("DateLogged",st_date,end _date))
.add(Subqueries.in("Id",subInfo));

the output is : java.lang.String cannot be cast to java.lang.Integer

Thank you for any help