From: Gavin_King/Cirrus%<CI...@ci...> - 2002-07-30 00:16:08
|
>I have a bidirectional 1:n mapping like this, and I have set >use_outer_join to true, but I cant get hibernate to fetch all elements >at once with an outer join. (I'm using a find query) Outerjoins are never used to fetch collection elements. Quite a few people have asked for this but I'm not even convinced its a particularly great thing to do (less trips to the database but more bandwidth usage and presumaby more load on the database). The main reason it isn't implemented is that I really need to redesign the whole way collections are fetched to be able to do it. Originally collection fetching was designed assuming that what you usually wanted was lazy initialization. Outerjoin fetching is a very aggressive *eager* initialization. At the moment outerjoin fetching is used only for <many-to-one> and <one-to-one> associations. And its _not_ used from the first level of a find() query (this is *not* a good thing). Now that I finished most of the stuff that was very high on my TODO list (over the past two weeks or so), I'm happy to move this issue (redesign of the fetching code) up to the top of the list. I'd say its certainly been the weakest area for a while now.... |