-->
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.  [ 7 posts ] 
Author Message
 Post subject: latest cvs hibernate3 issue with classic query
PostPosted: Thu Nov 10, 2005 6:10 pm 
Beginner
Beginner

Joined: Tue Apr 12, 2005 9:15 pm
Posts: 24
I just took latest cvs hibernate3. I am using classic query - and the queries that used to work, doesn't work with this latest. It gives an error saying :
java.lang.UnsupportedOperationException: select clause aliases ar
e not supported by classic parser
at org.hibernate.hql.classic.QueryTranslatorImpl.getReturnAliases(QueryTranslatorImpl.java:230)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:95)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:52)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:108)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:88)

please, can this be fixed? I need to use the latest cvs due to some bugs that got fixed and I need to implement this newly build hibernate3.jar


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 6:26 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
That's probably just a missing "as" somewhere. Can you post your now-broken query?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 7:29 pm 
Beginner
Beginner

Joined: Tue Apr 12, 2005 9:15 pm
Posts: 24
actually, I do have "as" in all of my hql queries and none of them are working. e.g:
generated select is -
SELECT emp FROM com.company.Employees AS emp WHERE emp.valid = 1


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 10, 2005 8:19 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Quote:
user1 said:
Code:
SELECT emp FROM com.company.Employees AS emp WHERE emp.valid = 1


That's almost SQL.. try the pure HQL version:

Code:
FROM Emp emp WHERE emp.valid = 1


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 12:17 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
oops, I broke that I guess. post a jira bug if you like. or better yet, stop using the classic translator ;)

i seriously need to think about removing that thing soon...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 11:07 am 
Beginner
Beginner

Joined: Tue Apr 12, 2005 9:15 pm
Posts: 24
thanks Steve. I will post a jira bug. Regarding not to use classic query, I have no choice, since I have several other queries that don't work with AST for some reason for sub select queries that involves sub-class properties. I will post jira for this one also. Can you see if this can be fixed for the AST query - Then, I can switch to that one.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 11:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
I have no idea what you are talking about. Is there a specific JIRA issue referencing what you believe to be incorrect behavior in the AST translator?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.