Skip to content

Commit c2c93d9

Browse files
fredericDelaportehazzik
authored andcommitted
NH-4000 - Prepare release of v5.0
* Set version to 5.0.0 * Update release notes * Obsolete fixes in documentation * Wording fixes in code documentation
1 parent a33d88e commit c2c93d9

19 files changed

+331
-49
lines changed

build-common/NHibernate.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<VersionMajor Condition="'$(VersionMajor)' == ''">5</VersionMajor>
44
<VersionMinor Condition="'$(VersionMinor)' == ''">0</VersionMinor>
55
<VersionPatch Condition="'$(VersionPatch)' == ''">0</VersionPatch>
6-
<VersionSuffix Condition="'$(VersionSuffix)' == ''">Alpha1</VersionSuffix>
6+
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
77

88
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
99
<AssemblyVersion>$(VersionMajor).$(VersionMinor).0.0</AssemblyVersion>

build-common/common.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
<!-- This is used only for build folder -->
3737
<!-- TODO: Either remove or refactor to use NHibernate.props -->
38-
<property name="project.version" value="5.0.0-Alpha1" overwrite="false" />
38+
<property name="project.version" value="5.0.0" overwrite="false" />
3939
<property name="project.version.numeric" value="5.0.0" overwrite="false" />
4040

4141
<!-- debug|release -->

default.build

+3
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,11 @@
190190
</copy>
191191
<copy todir="${bin-pack.required}">
192192
<fileset basedir="${bin.dir}">
193+
<include name="Antlr3.Runtime.???" />
193194
<include name="Iesi.Collections.???" />
194195
<include name="NHibernate.???" />
196+
<include name="Remotion.Linq.???" />
197+
<include name="Remotion.Linq.EagerFetching.???" />
195198
</fileset>
196199
</copy>
197200
<!--Required Bins for lazy loading NHibernate.ByteCode.Castle.dll-->

doc/reference/modules/architecture.xml

+2-2
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

+28-16
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>
@@ -2643,7 +2650,7 @@
26432650
</entry>
26442651
<entry>
26452652
Default when no <literal>type</literal> attribute specified. Does no
2646-
more ignore milliseconds since NHibernate v5.0.
2653+
longer ignore fractional seconds since NHibernate v5.0.
26472654
</entry>
26482655
</row>
26492656
<row>
@@ -2652,7 +2659,10 @@
26522659
<entry>
26532660
<literal>DbType.DateTime</literal> / <literal>DbType.DateTime2</literal><coref linkend="basic_mapping.datetime-co" />
26542661
</entry>
2655-
<entry><literal>type="DateTimeNoMs"</literal> must be specified. Ignores milliseconds.</entry>
2662+
<entry>
2663+
<literal>type="DateTimeNoMs"</literal> must be specified. Ignores fractional seconds.
2664+
Available since NHibernate v5.0.
2665+
</entry>
26562666
</row>
26572667
<row>
26582668
<entry><literal>DateTime2</literal></entry>
@@ -2727,7 +2737,7 @@
27272737
<literal>type="LocalDateTime"</literal> must be specified. Ensures the
27282738
<literal>DateTimeKind</literal> is set to <literal>DateTimeKind.Local</literal>.
27292739
Throws if set with a date having another kind.
2730-
Does no more ignore milliseconds since NHibernate v5.0.
2740+
Does no longer ignore fractional seconds since NHibernate v5.0.
27312741
</entry>
27322742
</row>
27332743
<row>
@@ -2738,7 +2748,8 @@
27382748
</entry>
27392749
<entry>
27402750
<literal>type="LocalDateTimeNoMs"</literal> must be specified. Similar to
2741-
<literal>type="LocalDateTime"</literal> but ignores milliseconds.
2751+
<literal>LocalDateTime</literal> but ignores fractional seconds.
2752+
Available since NHibernate v5.0.
27422753
</entry>
27432754
</row>
27442755
<row>
@@ -2829,7 +2840,7 @@
28292840
<entry>
28302841
Ensures the <literal>DateTimeKind</literal> is set to <literal>DateTimeKind.Utc</literal>.
28312842
Throws if set with a date having another kind.
2832-
Does no more ignore milliseconds since NHibernate v5.0.
2843+
Does no longer ignore fractional seconds since NHibernate v5.0.
28332844
</entry>
28342845
</row>
28352846
<row>
@@ -2840,7 +2851,8 @@
28402851
</entry>
28412852
<entry>
28422853
<literal>type="UtcDateTimeNoMs"</literal> must be specified. Similar to
2843-
<literal>type="LocalDateTime"</literal> but ignores milliseconds.
2854+
<literal>UtcDateTime</literal> but ignores fractional seconds.
2855+
Available since NHibernate v5.0.
28442856
</entry>
28452857
</row>
28462858
<row>
@@ -3251,7 +3263,7 @@
32513263
NHibernate's schema evolution tools, to provide the ability to fully define
32523264
a user schema within the NHibernate mapping files. Although designed specifically
32533265
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>
3266+
SQL command that can be run via a <literal>DbCommand.ExecuteNonQuery()</literal>
32553267
method is valid here (ALTERs, INSERTS, etc). There are essentially two modes for
32563268
defining auxiliary database objects.
32573269
</para>

doc/reference/modules/configuration.xml

+3-3
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

+1-2
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

+1-1
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_linq.xml

+6-3
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,15 @@ using NHibernate.Linq;]]></programlisting>
428428
At that point, all defined future results are evaluated in one single round-trip to database.
429429
</para>
430430
<programlisting><![CDATA[// Define queries
431-
IEnumerable<Cat> cats =
431+
IFutureEnumerable<Cat> cats =
432432
session.Query<Cat>()
433433
.Where(c => c.Color == "black")
434434
.ToFuture();
435435
IFutureValue<int> catCount =
436436
session.Query<Cat>()
437437
.ToFutureValue(q => q.Count());
438438
// Execute them
439-
foreach(Cat cat in cats)
439+
foreach(Cat cat in cats.GetEnumerable())
440440
{
441441
// Do something
442442
}
@@ -447,7 +447,9 @@ if (catCount.Value > 10)
447447
]]></programlisting>
448448
<para>
449449
In above example, accessing <literal>catCount.Value</literal> does not trigger a round-trip to database:
450-
it has been evaluated with <literal>cats</literal> enumeration.
450+
it has been evaluated with <literal>cats.GetEnumerable()</literal> call. If instead
451+
<literal>catCount.Value</literal> was accessed first, it would have executed both future and
452+
<literal>cats.GetEnumerable()</literal> would have not trigger a round-trip to database.
451453
</para>
452454
</sect1>
453455

@@ -482,6 +484,7 @@ IList<Cat> oldCats =
482484
oldCatsQuery
483485
.FetchMany(c => c.AnotherCollection)
484486
.ToFuture()
487+
.GetEnumerable()
485488
.ToList();]]></programlisting>
486489
<para>&nbsp;</para>
487490

doc/reference/modules/query_queryover.xml

+2-2
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

+2-2
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

+1-1
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)