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
|
|