Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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 ...
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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,

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic