I am really new to Hibernate. I need to do this:
I have two tables:
table questions:
ID, Answer, StudentId
Table student:
ID, Name, Email.
Page flow is like this:
Page1: question form-- click continue---Page2: student info form--submit.
I have made the mapping for two classes: questions and student.
How can I make sure the same "StudentId" in questions table will be inserted in "ID" in student table(to keep the refrential integrity).
I am using struts/hibernate/oracle.
Can someone throw some light on this?
Thank you,
Richard
|