I think there's a problem with configuring NH to not use the reflection optimizer except through app.config. We're configuring NH through our own Configuration Service and creating a Configuration object to use in building the SessionFactory. If I set 'hibernate.use_reflection_optimizer' to 'false' on the Configuration object I still get a message in the log from log4net that states that the optimizer is being used. If I just add the relevent key in the app.config that sets it to false like so:
Code:
<nhibernate>
<add
key="hibernate.use_reflection_optimizer"
value="false"
/>
</nhibernate>
It turns off the optimizer. I noticed in a post that Sergey said to set the property on the Environment object in NH.Cfg but that property doesn't have a setter (at least in 1.0.1 it doesn't).
All other configuration of NH is done via this method - app.config doesn't contain any NH sections - and I haven't run into a problem with anything else. I set many properties such as hibernate.show_sql on the Configuration object this way as well as calling AddAssembly and this seems to be the first property I've had issues with.
Thx,
benster
Hibernate version: 1.0.1
Mapping documents:N/A
Code between sessionFactory.openSession() and session.close():N/A
Full stack trace of any exception that occurs:N/A
Name and version of the database you are using:N/A
The generated SQL (show_sql=true):N/A
Debug level Hibernate log excerpt:N/A
[/code]