1

I need to eager load an object tree with NHibernate but I also wish to specify which objects to load.

The object tree is like this:

class A {
   double Date;
   IList<B> Bs;
}

class B {
   double Date;
   IList<C> Bs;
}

class C {
   double Date;
}

And what I want to do, is to eager load the whole tree, where A.Date > 2012, B.Date > 2012, C.Date > 2012 (basicly I want only a snapshot of the object tree according to my specified constraints).

Is that possible ?

I'm using NH 3.1 and Fluent.

Thanks!

user315648
  • 1,945
  • 3
  • 22
  • 30

1 Answers1

1

Have you tried with NHibernate Filters ? http://nhibernate.info/doc/nh/en/index.html#objectstate-filters

hazzik
  • 13,019
  • 9
  • 47
  • 86
Dario Quintana
  • 3,816
  • 1
  • 18
  • 8