Skip to content

Commit 0240b73

Browse files
fredericDelaportehazzik
authored andcommitted
Remove reference to <nhibernate> configuration section
- Obsolete since v2.0.0 - Obsoleted in NH-1087
1 parent 97f13e7 commit 0240b73

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

doc/reference/modules/configuration.xml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,6 @@ var session = sessions.OpenSession(conn);
146146
<literal>Configuration.SetProperties()</literal>.
147147
</para>
148148
</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>
156149
<listitem>
157150
<para>
158151
Include <literal>&lt;property&gt;</literal> elements in a configuration
@@ -449,13 +442,11 @@ var session = sessions.OpenSession(conn);
449442
</para>
450443

451444
<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
453446
<literal>NHibernate.Cfg.Environment</literal> class or be defined in the
454-
<literal>&lt;nhibernate&gt;</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>&lt;hibernate-configuration&gt;</literal> section of the application configuration
458-
file.
447+
<literal>&lt;hibernate-configuration&gt;</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.
459450
</para>
460451

461452
<table frame="topbot" id="configuration-optional-properties" revision="3">
@@ -529,7 +520,7 @@ var session = sessions.OpenSession(conn);
529520
</entry>
530521
<entry>
531522
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.
533524
The use of the reflection optimizer inflicts a certain startup cost on the
534525
application but should lead to better performance in the long run.
535526
Defaults to <literal>true</literal>.
@@ -552,9 +543,17 @@ var session = sessions.OpenSession(conn);
552543
</entry>
553544
<entry>
554545
Specifies the bytecode provider to use to optimize the use of reflection in NHibernate.
546+
This is a system-level property.
555547
Use <literal>null</literal> to disable the optimization completely, <literal>lcg</literal>
556548
to use built-in lightweight code generation, or the class name of a custom
557549
<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>&lt;hibernate-configuration&gt;</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>
558557
<para>
559558
<emphasis role="strong">eg.</emphasis>
560559
<literal>null</literal> | <literal>lcg</literal> |
@@ -1483,7 +1482,7 @@ in the parameter binding.</programlisting>
14831482
<para>
14841483
An alternative approach is to specify a full configuration in a file named
14851484
<literal>hibernate.cfg.xml</literal>. This file can be used as a replacement
1486-
for the <literal>&lt;nhibernate;&gt;</literal> or <literal>&lt;hibernate-configuration&gt;</literal>
1485+
for the <literal>&lt;hibernate-configuration&gt;</literal>
14871486
sections of the application configuration file.
14881487
</para>
14891488

0 commit comments

Comments
 (0)