Hi ,
I have 3 tables. LKUP , TKT_QST_ACTN and TKT.
TKT_QST_ACTN have foreign key reference of LKUP through LKUP_ID.
and TKT_QST_ACTN have also foreign key reference of TKT through TKT_NO
Now I have to retrieve all the tktQstActn objects for a particular ticket number by joining lkup on lkup.typ.
It is possible that TKT_QST_ACTN dont have all the reference of LKUP_ID for a particular TKT_NO.
But I have to retrieve all the LKUP_ID also for that TKT_NO.
my HQL IS ::
from TktQstActn tqs right join tqs.lkup lk where lk.typ in ('X' , 'Y')
It retrieves object array with first element of tktQstActn and second element as lkup. It retrieves null tktQstActn with valid lkup reference.
but when I want to fetch tktQstQctn for a particular ticket with following query it RETRIEVES ONLY that rows that have a reference with lkup .
HQL is :
from TktQstActn tqs right join tqs.lkup lk where lk.typ in ('X' , 'Y') and tqs.tkt.tktNo = '5'
I am using Eclipse 's hibernate tool to see my result.
Can Anyone please throw some light
on how can i retrieve all the tktQstActn objects having reference + not having reference with lkup object for a paarticular ticket number .....
|