Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Beans - representing 1-m relationships

 
Ed Lance
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have recently started using java beans and I'm curious about the best way to retrieve and view data from queries involving 1-m realationships. On the veiw (jsp) I only want to display the data from the "1" record once, then loop through the data from the "many" (a basic control-break senario).
I am doing it by loading up a separate vector each time the key in the "1" record changes. In my view, I then use an enumeration to loop through each vector, instantiate the bean and call the properties I need at that point (Data is for display only, so not using a control servlet). Just curious if anyone has a better way.
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic