lazy « HQL « JPA Q&A

1. how to force HQL to return lazy proxies?

Author Message wciesiel Post subject: how to force HQL to return lazy proxies? Posted: Fri Feb 12, 2010 7:39 am Newbie Joined: Tue Jul 12, 2005 6:55 pm Posts: 9 Hi there, I am having a problem with a requirement to make a query returning some statistics (count grouped by some fields). When I create a Criteria query like ...

2. Problem with HQL and non-lazy many-to-one since 3.2.2

Hello, I suspect a (major) bug here, there is wrong behaviour that occurs since version 3.2.2 and has never occurred with older versions (3.2.1, 3.1, 3.0, 2.x). Hibernate version: 3.2.2 Mapping documents: (the mapping is only a partial example) When I execute HQL "select c.segment from Customer c", ...

3. Help with HQL! need to avoid lazy inizialization issue!

org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=f,role=model.Experiment.features,tableName=experimentdb.feature,tableAlias=features1_,origin=experimentdb.experiment experiment0_,colums={experiment0_.experiment_id ,className=model.Feature}}] [select e.features from model.Experiment e inner join fetch e.features as f where e.experimentId=1] at org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause( at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause( at org.hibernate.hql.ast.HqlSqlWalker.processQuery( at org.hibernate.hql.antlr.HqlSqlBaseWalker.query( at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement( at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(