[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - how to do a subquery in JBoss?
do-not-reply at jboss.com
Sat Mar 10 01:45:18 EST 2007
now, I need to do a subquery like this:
SELECT OBJECT(a) FROM SelectedRecs a WHERE a.sID2 IN (SELECT b.SID2 FROM SessionView b WHERE (b.LocalIP='220.127.116.11' AND b.RmtIP='18.104.22.168') OR (b.LocalIP='22.214.171.124' AND b.RmtIP='126.96.36.199'))
note that: SessionView is another table. now I just write an entitybean for table SelectedRecs, not for it.
when I run the demo using the EJB-QL above, it met some problems.
so I wanna know how to do a subquery in JBoss, and the subquery is from another table. please give me a suggestion, thanks a lot.
my msn is: qixiangnj AT gmail DOT com.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026843#4026843
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026843
More information about the jboss-user