In a special case we do not want to change mapping files and adding lazy="false" to each of them because of upgrading NHibernate. Is it possible to disable lazy loading in a total application by just adding something to app.config or web.config?
+2
A:
From what I can tell you will have to change the mapping files. I might be wrong but I couldn't find any global setting.
If you didn't want to change the class definition you could define it in the root element of each mapping file you have:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" default-lazy="false">
JoshBerke
2010-02-16 15:07:22
Thanks Josh, there is also a related link: https://www.hibernate.org/407.html
afsharm
2010-02-17 05:53:00