hello, I am using Struts 1.2.7 together with Hibernate 3.0. My datamodel is not too complex, but one of my Struts-forms needs to fetch data from several tables. My tables are called A, B and C. One A contains many B's and one B contains many C's. In Struts, I would need to display data from all three tables and also be able to save changes. How would I go about to do this? In MyForm.java, which primarily models A, I have getters and setters for all of A columns, like name, id etc. But what about B and C? I guess it would not be possible to have these as Sets in MyForm.java? I could maybe model B as an ArrayList and use <nested:iterate> and <nested:text> in my jsp, but then again: what about C?
To just display the data would not be a big problem, but when I want to make changes to the data in e.g. C, I would also need some setters for the properties. Really don't know how to do this... Any ideas would be highly appreciated! cheers, pj