Hi
I have the following model structure
Contract -> IEnumerable<ContractInputSpotLine>
ContractInputSpotLine -> IEnumerable<ContractSpotLine>
I need to calculate a value for the contract which is based on values in
the ContractSpotLine so need to load all ContractInputSpotLines with all
related ContractSpotLines. Everything I try so far I seem to run in to
cartesian product type issues. I am currently using Linq with Fetch, but
wouldn't mind using the Criteria API either. Can anyone point me in the
right direction to some decent documentation on this type of issue or
provide some sample code to push me in the right direction. I've currently
tried the following (which I found on stackoverflow)
Session.QueryOver<Contract>()
.Fetch(c => c.ContractInputSpotLines)
.Fetch(c => c.ContractInputSpotLines[0].ContractSpotLines)
and something similar using JoinAlias and Future from
http://stackoverflow.com/questions/5208991/nhibernate-lazy-loading-nested-collections-with-futures-to-avoid-n1-problem
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/KJ2i4Wh-c_IJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.