EJB design: Specify relationship in mapping using some condition not just id
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?
- Posted by: Sandeep Vaid
- Posted on: April 27 2009 03:22 EDT