JPA and Dynamic Relationships

I have the following table:

time_types

Id, Name

1,"Breakfast"

2,"Lunch"

3,"Dinner"

And then I have a table that represents the user values (the opening and closing times for each of time types defined above):

time_type_values

Id, time_type_id, open, close

1,1,"1970-01-01 10:00:00","1970-01-01 11:00:00"

2,2,"1970-01-01 22:00:00","1970-01-01 23:00:00"

3,3,"1970-01-01 13:00:00","1970-01-01 14:00:00"

How can the user create these particular properties when at least initially, the time_type_values have not yet been created?

[603 byte] By [aantix1a] at [2007-11-26 17:25:19]
# 1

Way off base with the correct forum here. You may have more luck in the Java Enterprise forums (I assume this relates to the Java Persistence APIs introduced in Java EE 5)

Also, could you be more specific. Which properties? I assume you have a static reference table with the data "Breakfast", "Lunch" and "Dinner" in it. Which values have not yet been created?

simonkent1a at 2007-7-8 23:53:21 > top of Java-index,Core,Core APIs...