Originally posted by Paul Sturrock:
Configure your mapping to lazily load associated objects and don't call the getter for that property. The child records will not be initialized until you ask for them.
True, but I think in his case for other "screens" that he has he wants eager loading, but for just that one screen he wants lazy loading.
Good question, even if that isn't what he is looking for.
Dropdowns, which I label as lookups, sometimes it is better to have a sql or hsql to get just the field information from the one table and put it into a Map or something to return to the client side.
We have screens like that and we created a Map that holds all the lookup values. So on one screen we might have 5 lookups, and on the serverside we query to get all 5 lookups, make a Map that has the "name" of the lookup as the key and a List of values as the value mapped to that key, then on the client side use a key, get the list and populate the dropdown. This keeps the calls to the serverside to one call and we get all 5 dropdown lists in the Map.
By the way Vinnie, it is good to see that you are now really liking Hibernate.
Mark