size « HQL « JPA Q&A





1. hql size seems not to be consistent with size() method    forum.hibernate.org

First of all thanks for your work, it has been really useful for me. Making tests i've noticed an inconsistentcy between size keyword of hql and size method of hibernate lists. Let me introduce the case, making test i accidentally added rows to a collection without respecting the correlative index field. When executing the test i've noticed that the List.size() method ...

2. HQL: 'size() <> 0' works, 'is not empty' does not    forum.hibernate.org

org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [from asrs.payment.model.ChangedPayment cp where cp.changes is not empty] at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31) at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24) at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59) at org.hibernate.hql.ast.QueryTranslatorImpl.generate(QueryTranslatorImpl.java:219) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:180) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72) ...