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.
posted 11 years ago
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