Hi,
I have a Data Tbl and employee tbl.
Data Tbl:
Id.....employeeId..... data.....Status 1..... e_1...............abc.....Active 2..... e_1.......... ....xyz.....Inactive 3..... e_2...............123.....Active 4.....e_3...............123.....Inactive
Employee Tbl:
Id .....Name e_1 .....J e_2 .....K e_3.....L
when i run the following query "select distinct e from Employee as e join e.datas as dt where dt.status='Active' order by e.Name asc" i correctly get only employees with active status, e1 & e2.
The issue i'm facing is if loop thro the above employee object ,say e_1 , my Data object is off size 2 instead of size1. any clue on solving it?
-thanks, prakash, UC davis
|