[jboss-user] [EJB 3.0] - ejb aggregate functions problem

mravikrish do-not-reply at jboss.com
Fri Dec 26 07:34:36 EST 2008


Hi,

   I am ramu. i am having a problem with group by clause.

my entities are project and bid

my query is

    SELECT distinct(p.projectId) FROM Project p JOIN p.bids b    GROUP BY p  HAVING COUNT(b) > 1

the above query is returning projectid.

but i want to get project object.

for that i have tried like this but not working

 SELECT distinct(p) FROM Project p JOIN p.bids b    GROUP BY p  HAVING COUNT(b) > 1

it is saying not a GROUP BY expression

please help me its very urgent.

Thanking You
KRamu







View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198568#4198568

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198568



More information about the jboss-user mailing list