lazy « HQL « JPA Q&A





1. how to force HQL to return lazy proxies?    forum.hibernate.org

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    forum.hibernate.org

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!    forum.hibernate.org

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(SelectClause.java:195) at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:705) at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:529) at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:645) at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281) at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)