-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: unexpected AST node: . near line
PostPosted: Wed Apr 14, 2010 12:55 pm 
Regular
Regular

Joined: Tue Feb 17, 2009 5:13 am
Posts: 59
Hi all. i'm trying to run following HQL query:

Code:
select new fully.quallifyed.name.MyBean(a.property1.property2.property3.property4, count(a.propertyA))
   from Table a
   where a.propertyB is null <!-- 2M -->
      and a.propertyC.propertyC1.class = MyBean2 <!-- particular -->
      and not a.propertyD
      and a.propertyE.propertyA is null
      and a.propertyE.propertyB is null
      and a.propertyE.propertyC is null
      and a.propertyE.propertyD is null
   group by a.property1.property2.property3.property4 <!-- Group by first value of tuple returned -->


And I'm getting the followinng error:
Code:
Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: . near line 5, column 34 [select new       fully.quallifyed.name.MyBean(a.property1.property2.property3.property4, count(a.propertyA))
   from Table a
   where a.propertyB is null <!-- 2M -->
      and a.propertyC.propertyC1.class = MyBean2 <!-- particular -->
      and not a.propertyD
      and a.propertyE.propertyA is null
      and a.propertyE.propertyB is null
      and a.propertyE.propertyC is null
      and a.propertyE.propertyD is null
   group by a.property1.property2.property3.property4
   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.analyze(QueryTranslatorImpl.java:235)
   at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
   at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
   at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
   at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
   at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
   at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
   at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
   at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
   at org.genaros.commons.dao.hibernate.support.query.CustomQueryCallback.doInHibernate(CustomQueryCallback.java:184)
   at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
   ... 21 more


Anybody knows if there is a syntax error?

MyBean class is BEAN complain, so has public empty constructor, public not empty constructor (a.property1.property2.property3.property4, long) and public getter, stter methods for all fileds.

_________________
Born to lose... live to win!


Top
 Profile  
 
 Post subject: Re: unexpected AST node: . near line
PostPosted: Thu Apr 15, 2010 4:36 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
hello,
wrong forum!
could you please post in the hibernate core forums? https://forum.hibernate.org/viewforum.php?f=1
Regards

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: unexpected AST node: . near line
PostPosted: Fri Apr 16, 2010 3:14 am 
Regular
Regular

Joined: Tue Feb 17, 2009 5:13 am
Posts: 59
Oops, sorry. I had a mistake login in this forum.

_________________
Born to lose... live to win!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.