Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB QL Help

 
Sandeep Ts
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!