I'm getting a org.hibernate.MappingException: Unknown entity: null error with this query
//subquery -Where clause subselect DetachedCriteria subquery = DetachedCriteria.forClass(Book.class, "u"); subquery.createAlias("u.bookProfile", "xp", CriteriaSpecification.INNER_JOIN); subquery.add(Restrictions.eqProperty("xp.bookName","stringabc")); subquery.setProjection(Property.forName("u.createTimestamp")); //outer query Criteria c = session.createCriteria(Book.class, "i"); c.add( Subqueries.geAll("i.createTimestamp", subquery));
Thanks in advance !
|