-->
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.  [ 2 posts ] 
Author Message
 Post subject: multile columns for count hql alternative
PostPosted: Sun Mar 14, 2010 3:09 pm 
Newbie

Joined: Sun Mar 14, 2010 2:58 pm
Posts: 2
Hi,
I am trying to write hql for the following sql:
select (distinct item1, item2) from Test
but get an error
Caused by: org.hibernate.hql.ast.QuerySyntaxException: expecting CLOSE, found ',' near line 1, column 32 [select count(distinct o.item1, o.item2) from Test o where o.id = :el1]

Elsewhere on this forum I saw that hql doesn't support multiple columns for count, is this still the case and if so is the a preferred alternative solution without falling back to native sql?

Thank you.


Top
 Profile  
 
 Post subject: Re: multile columns for count hql alternative
PostPosted: Tue Nov 16, 2010 10:09 pm 
Newbie

Joined: Sun Mar 14, 2010 2:58 pm
Posts: 2
Hi,

still will like to know if there are any ways to get it to work.


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