Skip to content

Commit b00839f

Browse files
Obsolete fixes in documentation.
1 parent c7845d8 commit b00839f

File tree

8 files changed

+29
-23
lines changed

8 files changed

+29
-23
lines changed

doc/reference/modules/architecture.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@
132132
<listitem>
133133
<para>
134134
(Optional) A factory for ADO.NET connections and commands. Abstracts application
135-
from the concrete vendor-specific implementations of <literal>IDbConnection</literal>
136-
and <literal>IDbCommand</literal>. Not exposed to application, but can be
135+
from the concrete vendor-specific implementations of <literal>DbConnection</literal>
136+
and <literal>DbCommand</literal>. Not exposed to application, but can be
137137
extended/implemented by the developer.
138138
</para>
139139
</listitem>

doc/reference/modules/basic_mapping.xml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,8 @@
106106
<area id="hm5" coords="6 55"/>
107107
<area id="hm6" coords="7 55"/>
108108
<area id="hm7" coords="8 55"/>
109-
</areaspec>
110-
<programlisting>
111-
<![CDATA[<hibernate-mapping
109+
</areaspec>
110+
<programlisting><![CDATA[<hibernate-mapping
112111
schema="schemaName"
113112
default-cascade="none|save-update"
114113
auto-import="true|false"
@@ -681,7 +680,7 @@
681680

682681
<para>
683682
Unfortunately, you can't use <literal>hilo</literal> when supplying your own
684-
<literal>IDbConnection</literal> to NHibernate. NHibernate must be able to
683+
<literal>DbConnection</literal> to NHibernate. NHibernate must be able to
685684
fetch the "hi" value in a new transaction.
686685
</para>
687686
</sect3>
@@ -1198,9 +1197,11 @@
11981197
</programlistingco>
11991198

12001199
<para>
1201-
Version numbers may be of type <literal>Int64</literal>, <literal>Int32</literal>,
1200+
Version may be of type <literal>Int64</literal>, <literal>Int32</literal>,
12021201
<literal>Int16</literal>, <literal>Ticks</literal>, <literal>Timestamp</literal>,
1203-
or <literal>TimeSpan</literal> (or their nullable counterparts in .NET 2.0).
1202+
<literal>TimeSpan</literal>, <literal>datetimeoffset</literal>, ... (or their nullable
1203+
counterparts in .NET 2.0). Any type implementing <literal>IVersionType</literal> is
1204+
usable as a version.
12041205
</para>
12051206

12061207
</sect2>
@@ -1433,7 +1434,11 @@
14331434
attribute. (For example, to distinguish between <literal>NHibernateUtil.DateTime</literal> and
14341435
<literal>NHibernateUtil.Timestamp</literal>, or to specify a custom type.)
14351436
</para>
1436-
1437+
1438+
<para>
1439+
See also <xref linkend="mapping-types" />.
1440+
</para>
1441+
14371442
<para>
14381443
The <literal>access</literal> attribute lets you control how NHibernate will access
14391444
the value of the property at runtime. The value of the <literal>access</literal> attribute should
@@ -2584,8 +2589,10 @@
25842589
<para>
25852590
The <emphasis>basic types</emphasis> may be roughly categorized into three groups - <literal>System.ValueType</literal>
25862591
types, <literal>System.Object</literal> types, and <literal>System.Object</literal> types for large objects. Just like
2587-
the .NET Types, columns for System.ValueType types <emphasis>can not</emphasis> store <literal>null</literal> values
2588-
and System.Object types <emphasis>can</emphasis> store <literal>null</literal> values.
2592+
Columns for System.ValueType types can handle <literal>null</literal> values only if the entity property is properly
2593+
typed with a <literal>Nullable&lt;T&gt;</literal>. Otherwise <literal>null</literal> will be replaced by the default
2594+
value for the type when reading, and when be overwritten by it when persisting the entity, potentially leading to
2595+
phantom updates.
25892596
</para>
25902597
<table>
25912598
<title>System.ValueType Mapping Types</title>
@@ -3251,7 +3258,7 @@
32513258
NHibernate's schema evolution tools, to provide the ability to fully define
32523259
a user schema within the NHibernate mapping files. Although designed specifically
32533260
for creating and dropping things like triggers or stored procedures, really any
3254-
SQL command that can be run via a <literal>IDbCommand.ExecuteNonQuery()</literal>
3261+
SQL command that can be run via a <literal>DbCommand.ExecuteNonQuery()</literal>
32553262
method is valid here (ALTERs, INSERTS, etc). There are essentially two modes for
32563263
defining auxiliary database objects.
32573264
</para>

doc/reference/modules/configuration.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ Configuration cfg = new Configuration()
115115
obtain ADO.NET connections wherever it pleases:
116116
</para>
117117

118-
<programlisting><![CDATA[IDbConnection conn = myApp.GetOpenConnection();
119-
ISession session = sessions.OpenSession(conn);
118+
<programlisting><![CDATA[var conn = myApp.GetOpenConnection();
119+
var session = sessions.OpenSession(conn);
120120
121121
// do some data access work]]></programlisting>
122122

@@ -291,7 +291,7 @@ ISession session = sessions.OpenSession(conn);
291291
<literal>command_timeout</literal>
292292
</entry>
293293
<entry>
294-
Specify the default timeout of <literal>IDbCommands</literal>
294+
Specify the default timeout of <literal>DbCommand</literal>s
295295
generated by NHibernate.
296296
</entry>
297297
</row>

doc/reference/modules/example_parentchild.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,7 @@ session.Flush();]]></programlisting>
342342
and <literal>OnSave()</literal> as follows.
343343
</para>
344344

345-
<programlisting>
346-
<![CDATA[public object IsTransient(object entity)
345+
<programlisting><![CDATA[public object IsTransient(object entity)
347346
{
348347
if (entity is Persistent)
349348
{

doc/reference/modules/manipulating_data.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ var problems = sess
160160
<para>
161161
These given <literal>Set</literal> parameters are used to bind the given values to the
162162
<literal>?</literal> query placeholders (which map to input
163-
parameters of an ADO.NET <literal>IDbCommand</literal>). Just
163+
parameters of an ADO.NET <literal>DbCommand</literal>). Just
164164
as in ADO.NET, you should use this binding mechanism in preference to string
165165
manipulation.
166166
</para>

doc/reference/modules/query_queryover.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ IList<CatSummary> catReport =
337337

338338
<para>
339339
In addition to projecting properties, there are extension methods to allow certain common dialect-registered
340-
functions to be applied. For example you can write the following to extract just the year part of a date:
340+
functions to be applied. For example you can write the following to get 3 letters named people.
341341
</para>
342-
<programlisting><![CDATA[ .Where(p => p.BirthDate.YearPart() == 1971)]]></programlisting>
342+
<programlisting><![CDATA[ .Where(p => p.FirstName.StrLength() == 3)]]></programlisting>
343343

344344
<para>
345345
The functions can also be used inside projections:

doc/reference/modules/query_sql.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ var pusList = query.SetString("name", "Pus%").List<Cat>();]]></programlisting>
588588
<itemizedlist spacing="compact">
589589
<listitem>
590590
<para>The procedure must return a result set. NHibernate will
591-
use <literal>IDbCommand.ExecuteReader()</literal> to obtain
591+
use <literal>DbCommand.ExecuteReader()</literal> to obtain
592592
the results.
593593
</para>
594594
</listitem>
@@ -657,7 +657,7 @@ var pusList = query.SetString("name", "Pus%").List<Cat>();]]></programlisting>
657657

658658
<para>The stored procedures are by default required to affect the same number
659659
of rows as NHibernate-generated SQL would. NHibernate uses
660-
<literal>IDbCommand.ExecuteNonQuery</literal> to retrieve the number of rows
660+
<literal>DbCommand.ExecuteNonQuery</literal> to retrieve the number of rows
661661
affected. This check can be disabled by using <literal>check="none"</literal>
662662
attribute in <literal>sql-insert</literal> element.
663663
</para>

doc/reference/modules/quickstart.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ finally
411411
NHibernate also offers an object-oriented <emphasis>query by criteria</emphasis> API
412412
that can be used to formulate type-safe queries, and the Hibernate Query Language (HQL),
413413
which is an easy to learn and powerful object-oriented extension to SQL.
414-
NHibernate of course uses <literal>IDbCommand</literal>s and parameter binding for all
414+
NHibernate of course uses <literal>DbCommand</literal>s and parameter binding for all
415415
SQL communication with the database. You may also use NHibernate's direct SQL query
416416
feature or get a plain ADO.NET connection from an <literal>ISession</literal> in rare
417417
cases.

0 commit comments

Comments
 (0)