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
  • 704,970
  • 168
  • 1,303
  • 1,425
ICS
  • 73
  • 9

1 Answers1

2

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

hazzik
  • 12,584
  • 7
  • 43
  • 85
Oskar Berggren
  • 5,535
  • 1
  • 16
  • 36