-->
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: Theta style join criteria
PostPosted: Thu Apr 13, 2006 2:40 pm 
Newbie

Joined: Thu Jul 21, 2005 6:30 pm
Posts: 5
Hi folks.

I have a query that looks something like:

from Provider p, UserSettings s where
p.settingsId = s.Id and
s.user = :someUser
...

I know that typically you would just establish a normal many-to-one relationship and add UserSettings as a property of the Provider object. In this specific case though I can not do because we have found that the complexity of the relationship makes allowing hibernate to maintain those relations is more trouble than it is worth (the above query is actually a simplification).

I am wondering if there is any way to do the same thing style of query using a Criteria? I need to be able to select an Object[] where results[0] is the Provider object and results[1] is the UserSettings object.

I'm already doing this just fine with HQL I just don't know if it is possible to accomplish the same thing by dynamically building the query using the more object oriented approach.

Josh


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.