Joined: Wed Jun 18, 2008 9:17 am Posts: 12
|
Hi
I am new to hibernate and had a question on join table .
I have few tables as follows:
eg.
- product
- productdetails
- testing session
- Assesment
- AssesmentTestLookup
- Test
productdetails table is used to lookup testingSessions for a particular product.
product --> productdetails ( 1 to many relationship )
productdetails --> testingsession ( 1 to many )
productdetails contains few other information apart from the lookup keys such and language value for example;
I have the following classes, and whats confusing me is the language field on the testing session which should be picked up during the join operation.
Product.java
- id
- Set<TestingSession> sessions
TestingSession.java
- id
- language
- Set<Assesment> assesments
How can i write the hibernate mapping when loading Product object it which will do the join using the productdetails table at the same time access the language value from the productdetails table and put it in the TestingSession object.
The examples i have seen using join table only uses the keys so any help will be appreciated.
Thanks in advance
|
|