jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Beans - representing 1-m relationships Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Beans - representing 1-m relationships" Watch "Beans - representing 1-m relationships" New topic

Beans - representing 1-m relationships

Ed Lance
Ranch Hand

Joined: Aug 02, 2000
Posts: 38
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Beans - representing 1-m relationships
It's not a secret anymore!