-->
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.  [ 3 posts ] 
Author Message
 Post subject: Criteria, subquery and outer join
PostPosted: Fri Apr 21, 2006 9:46 pm 
Beginner
Beginner

Joined: Wed Feb 15, 2006 2:51 pm
Posts: 20
Hi guys,

I been searching the forum, found few things but nothing that will solve this problem. So i turn to you for help.

Here is how the query would look in sql

table -> people
ppl_id
lname
fname

table -> positions
pos_id
position_name
position_type
ppl_id (forign_key)


select * from people, (select position_name, ppl_id from positions where position_type = 'Manager') pos
where people.ppl_id = pos.ppl_id (+)

so what i am trying to do is put this query with a subquery and an outer coin in to a criteria class (I can do it with sql and hql) .

Is this possible.

I found post how to do a subquery with Detachedquery, but most of them put the query in the where area, i need it the form area.

thank you.

Robert,


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 22, 2006 11:10 am 
Beginner
Beginner

Joined: Wed Feb 15, 2006 2:51 pm
Posts: 20
bumpski
sorry!!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 23, 2006 10:41 pm 
Beginner
Beginner

Joined: Wed Feb 15, 2006 2:51 pm
Posts: 20
I found some information in the forum that hibernate does not support
“from clause subqueries” in criteria and in HQL (the post was referring to hib v2)


does any one know if this is true for hib 3?

Any body know why this is not supported?

I might start developing something that can be use for that!!

I guess my alternatives are to map some views that use subqueries in the from clause.[/b]


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