@@ -146,13 +146,6 @@ var session = sessions.OpenSession(conn);
146
146
<literal >Configuration.SetProperties()</literal >.
147
147
</para >
148
148
</listitem >
149
- <listitem >
150
- <para >
151
- Add the properties to a configuration section in the application
152
- configuration file. The section should be named <literal >nhibernate</literal >
153
- and its handler set to <literal >System.Configuration.NameValueSectionHandler</literal >.
154
- </para >
155
- </listitem >
156
149
<listitem >
157
150
<para >
158
151
Include <literal >< property> </literal > elements in a configuration
@@ -449,13 +442,11 @@ var session = sessions.OpenSession(conn);
449
442
</para >
450
443
451
444
<para >
452
- System -level properties can only be set manually by setting static properties of
445
+ Some properties are system -level properties. They can only be set manually by setting static properties of
453
446
<literal >NHibernate.Cfg.Environment</literal > class or be defined in the
454
- <literal >< nhibernate> </literal > section of the application
455
- configuration file. These properties cannot be set using
456
- <literal >Configuration.SetProperties</literal > or be defined in the
457
- <literal >< hibernate-configuration> </literal > section of the application configuration
458
- file.
447
+ <literal >< hibernate-configuration> </literal > section of the application
448
+ configuration file. These properties cannot be set using <literal >Configuration.SetProperties</literal > or
449
+ the <literal >hibernate.cfg.xml</literal > configuration file.
459
450
</para >
460
451
461
452
<table frame =" topbot" id =" configuration-optional-properties" revision =" 3" >
@@ -529,7 +520,7 @@ var session = sessions.OpenSession(conn);
529
520
</entry >
530
521
<entry >
531
522
Enables use of a runtime-generated class to set or get properties of an entity
532
- or component instead of using runtime reflection (System -level property) .
523
+ or component instead of using runtime reflection. This is a system -level property.
533
524
The use of the reflection optimizer inflicts a certain startup cost on the
534
525
application but should lead to better performance in the long run.
535
526
Defaults to <literal >true</literal >.
@@ -552,9 +543,17 @@ var session = sessions.OpenSession(conn);
552
543
</entry >
553
544
<entry >
554
545
Specifies the bytecode provider to use to optimize the use of reflection in NHibernate.
546
+ This is a system-level property.
555
547
Use <literal >null</literal > to disable the optimization completely, <literal >lcg</literal >
556
548
to use built-in lightweight code generation, or the class name of a custom
557
549
<literal >IBytecodeProvider</literal > implementation. Defaults to <literal >lcg</literal >.
550
+ <para >
551
+ You can not set this property in <literal >hibernate.cfg.xml</literal >, but only
552
+ in <literal >< hibernate-configuration> </literal > section of the application
553
+ configuration file or by code by setting
554
+ <literal >NHibernate.Cfg.Environment.BytecodeProvider</literal >
555
+ before creating any <literal >NHibernate.Cfg.Configuration</literal > instance.
556
+ </para >
558
557
<para >
559
558
<emphasis role =" strong" >eg.</emphasis >
560
559
<literal >null</literal > | <literal >lcg</literal > |
@@ -1483,7 +1482,7 @@ in the parameter binding.</programlisting>
1483
1482
<para >
1484
1483
An alternative approach is to specify a full configuration in a file named
1485
1484
<literal >hibernate.cfg.xml</literal >. This file can be used as a replacement
1486
- for the <literal >< nhibernate; > </ literal > or < literal > < hibernate-configuration> </literal >
1485
+ for the <literal >< hibernate-configuration> </literal >
1487
1486
sections of the application configuration file.
1488
1487
</para >
1489
1488
0 commit comments