Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Beans - representing 1-m relationships  RSS feed

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.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!