which is the question ?
2009/8/10 mhnyborg mhnyb...@gmail.com
I just want to here if NH 2.1 has some new features that makes
selection from 3 levels possible.
for example I want to load all customers with all orders and order
lines. I can get the Customers and orders using
The question is: can I distinct load this object graph: Baselines-
HasMany-BaselineMilestones-HasMany-BaselineMilestonePrevious
var baselines = session.CreateQuery( from Baseline b left join fetch
b.BaselineMilestones bm left join fetch bm.BaselineMilestonePrevious
)
If your question is how to do it, here you have an example:
*select o from Order o join fetch o.Lines li join fetch li.Article where
o.Id = :Id*
OR
*
s.CreateCriteria(typeof (Order))
.SetFetchMode(Lines, FetchMode.Join)
.SetFetchMode(Lines.Article,
but... you should understand the difference between set and bag ;)
P.S. bag es una bolsa de gatos.
2009/8/10 Dario Quintana conta...@darioquintana.com.ar
If your question is how to do it, here you have an example:
*select o from Order o join fetch o.Lines li join fetch li.Article where
o.Id
Thanks for reply.
But I have 3 collection
var baselines = session.CreateQuery( from Baseline b left join fetch
b.BaselineMilestones bm left join fetch bm.BaselineMilestonePrevious)
.SetResultTransformer
(Transformers.DistinctRootEntity)