Say i have one-to-one relationship Say i have one-to-many relationship between Product and ProductNames Product ----> PID (PK) ProductNames------> PID, USECODE, STARTTIME as composite ID and ENDTIME is another normal column. Now i want to fetch product with PID='1' and USECODE='100' and STARTTIME < CURRENTTIME < ENDTIME. CURRENTTIME value will be known at runtime. How to specify this in mapping and fetch Product & ProductNames using eager fetching?