Hi All
Supposed i have a table student which has fields as:
student_id number - this is the primary key
student_name varchar
student_surname varchar
A table student_rel which is the relational table is as:
student_rel_id - this is the primary key
student_id - this refers the above primary key
Table student_details as follows:
address_id
student_rel_id - mapped from above
address
Pls dont tell me to change the db design as its an existing one
...
My question is whether it is possible to tell hibernate to automatically do things as below on insertion in the student table:
1. hibernate should automatically insert into the relational table student_rel
2. Fetch the student_rel_id after generation from step 2 and insert this along with the address in address table