persistence@glassfish.java.net

How to join 3-4 tables and use subquery in a JPA createQuery???

From: allpurpose <allpurpose.lu_at_gmail.com>
Date: Mon, 5 Nov 2007 15:54:39 -0800 (PST)

Hi, i am new to JPA, just wonder how to write a very complex query including
multiple tables and subquery, say "
select *
from customer c, order o, item i
where c.customerId
not in (select c.customerId
          from customer c, order o, item i
          where item.itemName !='apple'
          )

is there a easy way to write complex query???

Thanks a lot.


-- 
View this message in context: http://www.nabble.com/How-to-join-3-4-tables-and-use-subquery-in-a-JPA-createQuery----tf4755252.html#a13598280
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.