-->
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.  [ 4 posts ] 
Author Message
 Post subject: User Criteria with multiple class
PostPosted: Fri Feb 18, 2005 2:35 pm 
Newbie

Joined: Tue Feb 01, 2005 10:20 pm
Posts: 10
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 2.x

Hi,

Is there a way to use Criteria with multiple clasess?
For example, I have classes A and B.
Class B has a foreign key column which keeps the IDs of class A.

I'd like to use a Criteria (if posible) to get data from both of those classes.

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 20, 2005 7:29 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
In HB2, you can't do this with the Criteria API, but you can do it with HQL (it's called projection, look at the "new" keyword in HQL).

I believe critieria-based projection is targetted for 3.1?" Or has that changed?

_________________
Cheers,
Shorn.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 20, 2005 7:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
org.hibernate.criterion.Projection is available in 3.0 beta 4


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 20, 2005 11:02 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
So does this mean Criteria-based projection is targetted for the production 3.0 release? Or will it be kind of low-priority (possibly excluded from 3.0) until the 3.1 release?

_________________
Cheers,
Shorn.


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