Hello all,
I'm working with a legacy database table that cannot be changed. I need to associate each DAY with a set of TIMES.
Here's the structure:
Table Name: DAY
day_id open_time close_time sequence
------ -------- ---------- --------
MONDAY 06:00 AM 08:00 PM 1
MONDAY 10:00 PM 10:30 PM 2
TUESDAY 06:00 AM 08:00 PM 1
WEDNESDAY 06:00 AM 07:00 PM 1
THURSDAY 06:00 AM 04:00 PM 1
THURSDAY 10:00 PM 10:30 PM 2
-The primary key is (day_id, sequence)
Here is what I have so far:
-I think there should be 2 entity beans (DayBean, TimeBean); DayBean has a Collection of TimeBeans
-There is a one-to-many relation from DayBean to TimeBean.
Has anyone else encountered a recursive table as such? Ideas?