This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB QL Help  RSS feed

 
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!