This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Correlated subqueries in HQL Select Clause Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Correlated subqueries in HQL Select Clause" Watch "Correlated subqueries in HQL Select Clause" New topic
Author

Correlated subqueries in HQL Select Clause

Amandeep Singh Khurpal
Greenhorn

Joined: Feb 20, 2012
Posts: 1
I am Trying use correlated Queries in HQL (in select clause) for the first time and i am having the problem, Please help

My HQL Query is of type


As per the Hibernate Documentation "HQL subqueries can occur only in the select or where clauses.Even correlated subqueries (subqueries that refer to an alias in the outer query) are allowed. "

But when i execute my HQl I have this Error
"org.hibernate.QueryException: aggregate function expected before ( in SELECT"

I have seen the selectParser of hibernate and it expects a Aggregate function whenever "(" is encountered

Please suggest

Thanks in Advance

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Correlated subqueries in HQL Select Clause
 
Similar Threads
How to use IN clause in HQL?
SQL to HQL (Having issue in Left Outer Join)
How to use IN Clause in HQL
Possible to create this HQL equivalent using Hibernate Criteria?
ClassicQueryTranslatorFactory & Custom Functions Doesn't work?