glaures wrote:
Did you try "select c.SomeList from Cat c" (without "as")?
Yes. Result is the same:
testList(hb.ReturnListTest)
java.lang.NullPointerException
at org.hibernate.hql.ast.tree.FromElementType.renderIdentifierSelect(FromElementType.java:140)
at org.hibernate.hql.ast.tree.FromElement.renderIdentifierSelect(FromElement.java:166)
at org.hibernate.hql.ast.tree.SelectClause.renderNonScalarIdentifiers(SelectClause.java:375)
at org.hibernate.hql.ast.tree.SelectClause.renderNonScalarSelects(SelectClause.java:353)
at org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:195)
at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:596)
at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:463)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:633)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:269)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:217)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:211)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:153)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:100)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:459)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:901)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:851)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at hb.ReturnListTest.testList(ReturnListTest.java:17)