Quote:
Cartesian products are considered a Bad Thing.
Haha. Um, agreed.
Quote:
Combine one outer join fetch, with batch fetching.
Ahhh. I looked at the batch fetching stuff. I suppose the pattern I'd use would be the first one I described in my post? Which was to do one outer join query, and then roll through the entire collection initializing any other collections. The batch fetching would ensure that most of my calls to intialize() don't incurr SQL queries (depending on batch size of course).
Yes?
I like this approach for a couple of reasons. Not the least of which is that it occurred to me that my ugly two-query-outer-join-idea might be flawed in that there's no guarantee without some ugly locking that the same User records will be returned by both calls (leaving some results half-initialized).
Thanks for that.
Now, for my lists that often get select * 'd... Is Hibernate's query caching the only way to do that? Is that something you'd recommend?
Thanks again,
phill