-->
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: alias non root entities in SQL Criteria
PostPosted: Sat Feb 20, 2010 2:49 pm 
Newbie

Joined: Tue Oct 28, 2003 4:43 pm
Posts: 13
Is there support for this yet?

http://opensource.atlassian.com/project ... e/HHH-2952

It looks like the bug was quickly rejected, but I think the issue still exists correct?

The problem is if you are using Criteria and have a join and you want to do a SQL projection or SQL group projection for example
Code:
Projections.sqlGroupProjection("month(dateCreated)")

It's possible that "dateCreated" is defined on both the root and join subquery table. And the generated SQL will fail because of this ambiguous reference.
To get the "dateCreated" on the root entity you would do
Code:
Projections.sqlGroupProjection("{alias}.month(dateCreated)")

This works. But how do you get the "dateCreated" on the joined table?


Top
 Profile  
 
 Post subject: Re: alias non root entities in SQL Criteria
PostPosted: Wed Feb 24, 2010 8:29 pm 
Newbie

Joined: Tue Oct 28, 2003 4:43 pm
Posts: 13
I know it is easy to get lost in the chatter here. Does anyone have any information on this issue? It is quite pressing at my 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.