• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

struts + hibernate confused on what type of mapping to use

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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





 
Arthur, where are your pants? Check under this tiny ad.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic