sergey wrote:
I believe that fetching multiple collections in one query was enabled in Hibernate 3 only recently. Fetching multiple many-to-one's should work ok. The Loader accepts only one collection to load in its methods, making it work with multiple collections would be quite an effort and I don't want to do it until after 1.0 is released. As to why it was coded that way, I don't know, probably it was much easier to code for Hibernate Team.
Sergey, you rock, thanks for the quick confirmation. It is bad news indeed but I need some sort of recommendation from you. What I do now takes N+1 queries for N objects with one-to-many relationships two levels deep and a fairly high number of cache hits of course when I actually query the root objects itself. It takes longer than I would want to already and the problem is that N could increase substantially.
What would be your final recommendation? I almost have no time to do my best, what could be the best? Schema change to have only one one-to-many? Some sort of special query? Advanced caching of stuff? Incremental loading? Some sort of lazy loading?
What I know is that I need the full graph for one of the features of the app. I can lazy load the ones that show up in the UI (30 or so). It will introduce a little latency but that's fine, it's not production grade anyway.
Just show me the path, you don't even have to lead me. My fate is in your hands, Sergey ;)
Thanks,
Gabor