You are forgetting some other NH feature.

2009/10/28 Igor <igor.korol...@gmail.com>

>
> On 21 окт, 18:05, Fabio Maulo <fabioma...@gmail.com> wrote:
> > I'm not so sure that such kind of query has a better performance than 2
> or 3
> > round-trips.
>
> I suppose, there will be more than "just 2 or 3 round-trips", as
> p.ADDRESSES is collection, and fetching collection and object tree
> (pretty deep in this case) for each item of this collection is not so
> cheap. Of course if we really have just 2-3 items in this collection,
> it will be not so bad... 1 query for collection items, and (2-3)*3
> queries for associated objects (in worst case where all objects will
> be different). But for other cases there are more reasons to avoid
> "1+n query problem"...
> For some cases it may be even better to prefetch small amounts of
> "reference data" with dummy queries - say
> "from Country" - to get all countries in 1 query and then
> initialization of any state.Country (but just in the same session, if
> there is no second-level cache) won't require db trip at all.
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to