0

In NHibernate is it possible to filter a collection property which is mapped as a bag association such that when the lazy loading occurs the filter is applied directly in the SQL rather than loading the whole bag collection and then filtering it?

F.Y.I - I'm using xml mapping files.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
ICS
  • 83
  • 9

1 Answers1

2

Yes, if you define the filter in the mappings: http://nhibernate.info/doc/nh/en/index.html#filters

hazzik
  • 13,019
  • 9
  • 47
  • 86
Oskar Berggren
  • 5,583
  • 1
  • 19
  • 36