From: Gavin_King/Cirrus%<CI...@ci...> - 2002-05-29 11:26:28
|
> I can quite easily implement arbitrarily-deep fetching so that we reduce > this to 1 + 5 = 6 SELECTs. (And I might do this tonight, actually.) > Optimally we could do it in a single select. That would require some > refactoring (unifying Query and ByIDQuery). Yeah, I just implemented deeper fetching so now, potentially, you can get a whole tree of objects in one go (but only if you got ANSI-style outerjoins). ie. * Session.load() will grab the whole tree in one SELECT (excluding collections) * Session.find() grabs root objects only in the first SELECT, then theres another SELECT for each immediate child of a root object. This is an improvement. An even bigger improvement find() to grab everything in one SELECT. |