wood burning stoves 2.0*
The moose likes Struts and the fly likes struts + hibernate confused on what type of mapping to use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts + hibernate confused on what type of mapping to use" Watch "struts + hibernate confused on what type of mapping to use" New topic
Author

struts + hibernate confused on what type of mapping to use

vanlalhmangaiha khiangte
Ranch Hand

Joined: Sep 11, 2006
Posts: 170
Hi all,

I am using struts2 + hibernate for current project.
I have a student_tab table and a registration_tab table.

1) A student record will be entered first
2) Based on the "serial_no" of the student table , i will create a registration for it in the registration_tab.
3) Student may / may not have registration

My problems is as below :
1) There is a query,edit,delete,create page for Student and Registration.
2) In student query page , only the student table will be displayed. (edit and delete students exists as links) << this is working >>
3) In registration query page, students table will be displayed ( but very less information like rollno,class etc .. ) along with the registration table (all the datas)
Here a create , edit ,delete registration link will exists << this is the part where the problem occurs >>
4) Even if there is a valid record in student table and in registration table with same "serial_no" , regninfo is always containing all null values.

When i save student object only student table should be saved and when i save registration object only registration table should be saved
What kind of mapping should i use? What will be the approach for this kind of design?


Thanks in advance,
Vanlal



Student.java



Registration.java





 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts + hibernate confused on what type of mapping to use