-->
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.  [ 1 post ] 
Author Message
 Post subject: Group by and attributes
PostPosted: Fri Sep 30, 2005 6:26 am 
Newbie

Joined: Wed Aug 10, 2005 8:07 am
Posts: 14
Hibernate version:3.0.5

Hi,
just a question about group by.

When you have a query like that

Code:
Select A, sum(aliasB.propertiesXXX)
from A aliasA
join alias.BSet aliasB
group by A



Hibernate generates a query with in the GROUP BY only the property A.id
but in the same time it generates all properties in the SELECT

The first solution is to put all properties in the group by, but this is very boring!!!
is there any other solution ?


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

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.