• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB QL Help

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using EJB 2.0 CMP. I have a one to many bidirectional relationship in OraderHeader(1) and (m)OrderDetail. OrderHeader has primarykey as (orderno,orderdate,custno) and OrderDetail has primary key as (orderno, orderdate, custno, lineno).

Now suppose I want to define a finder method in OrderDetailLocalHome as findByHeader(OrderHeaderPK headerPK). What should be my EJB QL? I am new to EJB. Please help me.

Thanks in advance.


Regards
 
Sandeep Ts
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to do it or I will have to change my finder method as findByHeader(Integer (orderno, long orderdate, Integer custno) ???
and use ql as

select object(o) from OrderDetail o
where orderNo = ?1 and
orderDate = ?2 and
custNo = ?3
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic