1. Not able to fetch property using Criteria and Projection stackoverflow.com
|
2. Criteria, Projections, and lazy-fetch collections. forum.hibernate.orgAll, Hibernate 3.0.5.... trying to project a lazy-fetched collection via a Criteria query: Code: List authors = session.createCriteria(Content.class) .setProjection(Projections.property("authors")) .list(); System.out.println("authors: " + authors); Authors is a lazy-fetched List... and when I execute this, I get a list of nulls: authors: [null, null, null, null, null, null, null, ... |
3. How to retrieve projection and object using Criteria Query forum.hibernate.orgHibernate version:3.30GA I need to do something similar to the following HQL, but need to use the Criteria API because I'm doing complex query assembly on the fly: "select p , p.field1 * p.field2 / p.field3 as calc1 from Person p order by calc1 desc " I'm having trouble using the criteria API. For example when I do the following: Code: ... |