• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 & Hibernate 3.0. one-to-many relationship

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I have 2 tables named as college and student.I want to implement one to many relationships in these two tables using Struts2 & Hibernate 3.0.

Therefore,every one record of college table may be linked to many records in student table.(i.e. one college many students).

I have created 2 model beans classes by the name college.java and student.java, one-to-many relationship between college.java and student.java is mapped using hibernate annotations.

My input jsp captures college and multiple students data in one screen.

I am using model driven interface in struts-2 action class.

However, model driven interface is able to transfer the data to only one model class at a time.

I need to transfer data to both college.java and student.java model class.

Please let me know the solution for the above problem.
 
Ranch Hand
Posts: 94
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please provide more information regarding how you are accessing data from data base? and what exactly you need to be populating in your view
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic