Joined: Wed Jul 07, 2004 5:35 am Posts: 7 Location: L
|
Hibernate version:2.1
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:HSQLDB v. 1.7.1
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hey there,
i have a problem with my mapping files. I have two custom classes. One named Week and one named Day. The fields of the classes are as followed:
Week: - weekID : int
- weekNumber: int
- year : int
- dayList : java.util.List (--> should contain Day objects)
Day: - dayID :int
- weekID :int
- day :java.lang.String
- date :java.util.Date
Now i want to get a Week object that contains in the dayList the Day objects associated to this Week(weekNumber and Year). My Primary keys are weekID in the Week class and dayID in the Day class. My foreign key is weekID in the Day class.
How should my mapping file look like, to get the Day objects into the java.util.List of the Week class?
Thanks for your help!
CU
Torben Werner
|
|