A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Object Relational Mapping
Question on JPQL...
Joined: Jul 26, 2007
Oct 08, 2007 06:30:00
I need help in formulating a JPQL query in this situation:
1. I have Customer and Order entities and I want all the Customers who have ordered something. I am thinking:
select c from Customer c, In(c.orders) o
Is that correct? Would the query be different in EJBQL and JPQL for this situation?
2. What if I want all the customers who have an order that is larger than say 100$?
select c from Customer c, In(c.orders) o where o.amt>100
Also, can someone point me to some resource that contains differences between EJBQL and JPQL?? I am really confused with both.
Joined: Feb 05, 2001
Oct 09, 2007 09:31:00
How about we move this to the more appropriate ORM forum, which covers JPA questions. Instead of it being linked from another thread you created in the ORM forum.
Perfect World Programming, LLC
Two Laptop Bag
How to Ask Questions the Smart Way FAQ
Joined: Oct 17, 2001
Oct 09, 2007 10:09:00
Hope this article helps you ->
I agree. Here's the link:
subject: Question on JPQL...
Two more mock questions
EJB QL - Joining two entities
Select ... from ...
EJB QL syntax
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015