Skip to content

Commit 90822c8

Browse files
Re-updated with latest doc changes.
- includes/meta have been re-injected.
1 parent 3cc8865 commit 90822c8

19 files changed

+321
-261
lines changed

doc/nh/en/index.html

Lines changed: 150 additions & 120 deletions
Large diffs are not rendered by default.

doc/nhibernate-reference/batch.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
layout:
33
---
44
<!doctype html>
@@ -137,8 +137,8 @@
137137
tx.Commit();
138138
}</pre><p>
139139
HQL <tt class="literal">UPDATE</tt> statements, by default do not effect the
140-
<a href="mapping.html#mapping-declaration-version" title="5.1.7.&nbsp;version (optional)">version</a>
141-
or the <a href="mapping.html#mapping-declaration-timestamp" title="5.1.8.&nbsp;timestamp (optional)">timestamp</a> property values
140+
<a href="mapping.html#mapping-declaration-version" title="5.1.8.&nbsp;version (optional)">version</a>
141+
or the <a href="mapping.html#mapping-declaration-timestamp" title="5.1.9.&nbsp;timestamp (optional)">timestamp</a> property values
142142
for the affected entities. However,
143143
you can force NHibernate to properly reset the <tt class="literal">version</tt> or
144144
<tt class="literal">timestamp</tt> property values through the use of a <tt class="literal">versioned update</tt>.

doc/nhibernate-reference/caches.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
layout:
33
---
44
<!doctype html>
@@ -39,7 +39,7 @@
3939
SQL dependency-based expiration, meaning that it is possible to configure certain cache regions to automatically
4040
expire when the relevant data in the database changes.
4141
</p><p>
42-
SysCache2 requires Microsoft SQL Server 2000 or higher and .NET Framework version 2.0 or higher.
42+
SysCache2 requires Microsoft SQL Server 2000 or higher.
4343
</p></dd><dt><span class="term"><tt class="classname">NHibernate.Caches.MemCache</tt></span></dt><dd><p>
4444
Uses <tt class="literal">memcached</tt>. See <a href="https://memcached.org/" target="_top">memcached homepage</a>
4545
for more information.
@@ -105,7 +105,7 @@
105105
</dd></dl></div><p>
106106
SysCache has a config file section handler to allow configuring different expirations and priorities for
107107
different regions. Here's an example:
108-
</p><div class="example"><a name="d0e15399"></a><p class="title"><b>Example&nbsp;26.1.&nbsp;</b></p><pre class="programlisting">&lt;?xml version="1.0" encoding="utf-8" ?&gt;
108+
</p><div class="example"><a name="d0e15524"></a><p class="title"><b>Example&nbsp;26.1.&nbsp;</b></p><pre class="programlisting">&lt;?xml version="1.0" encoding="utf-8" ?&gt;
109109
&lt;configuration&gt;
110110
&lt;configSections&gt;
111111
&lt;section name="syscache"
@@ -124,13 +124,13 @@
124124
</p><p>
125125
To configure cache regions with SqlCacheDependencies a <tt class="literal">syscache2</tt> config section must be
126126
defined in the application's configuration file. See the sample below.
127-
</p><div class="example"><a name="d0e15412"></a><p class="title"><b>Example&nbsp;26.2.&nbsp;</b></p><pre class="programlisting">
127+
</p><div class="example"><a name="d0e15537"></a><p class="title"><b>Example&nbsp;26.2.&nbsp;</b></p><pre class="programlisting">
128128
&lt;configSections&gt;
129129
&lt;section name="syscache2"
130130
type="NHibernate.Caches.SysCache2.SysCacheSection, NHibernate.Caches.SysCache2"/&gt;
131-
&lt;/configSections&gt;</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e15415"></a>26.4.1.&nbsp;Table-based Dependency</h3></div></div><div></div></div><p>
131+
&lt;/configSections&gt;</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e15540"></a>26.4.1.&nbsp;Table-based Dependency</h3></div></div><div></div></div><p>
132132
A table-based dependency will monitor the data in a database table for changes. Table-based
133-
dependencies are generally used for a SQL Server 2000 database but will work with SQL Server 2005 as
133+
dependencies are generally used for a SQL Server 2000 database but will work with SQL Server 2005 or superior as
134134
well. Before you can use SQL Server cache invalidation with table based dependencies, you need to
135135
enable notifications for the database. This task is performed with the <span><b class="command">aspnet_regsql</b></span>
136136
command. With table-based notifications, the application will poll the database for changes at a
@@ -139,7 +139,7 @@
139139
</p><p>
140140
To configure the data in a cache region to be invalidated when data in an underlying table is changed,
141141
a cache region must be configured in the application's configuration file. See the sample below.
142-
</p><div class="example"><a name="d0e15425"></a><p class="title"><b>Example&nbsp;26.3.&nbsp;</b></p><pre class="programlisting">&lt;syscache2&gt;
142+
</p><div class="example"><a name="d0e15550"></a><p class="title"><b>Example&nbsp;26.3.&nbsp;</b></p><pre class="programlisting">&lt;syscache2&gt;
143143
&lt;cacheRegion name="Product"&gt;
144144
&lt;dependencies&gt;
145145
&lt;tables&gt;
@@ -156,7 +156,7 @@
156156
The name of a database defined in the <tt class="literal">databases</tt> element for
157157
<tt class="literal">sqlCacheDependency</tt> for caching (ASP.NET Settings Schema) element of the
158158
application's <tt class="literal">Web.config</tt> file.
159-
</dd></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e15461"></a>26.4.2.&nbsp;Command-Based Dependencies</h3></div></div><div></div></div><p>
159+
</dd></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e15586"></a>26.4.2.&nbsp;Command-Based Dependencies</h3></div></div><div></div></div><p>
160160
A command-based dependency will use a SQL command to identify records to monitor for data changes.
161161
Command-based dependencies work only with SQL Server 2005.
162162
</p><p>
@@ -171,15 +171,15 @@
171171
</p><p>
172172
To configure the data in a cache region to be invalidated based on a SQL command, a cache region must
173173
be configured in the application's configuration file. See the samples below.
174-
</p><div class="example"><a name="d0e15470"></a><p class="title"><b>Example&nbsp;26.4.&nbsp;Stored Procedure</b></p><pre class="programlisting">&lt;cacheRegion name="Product" priority="High" &gt;
174+
</p><div class="example"><a name="d0e15595"></a><p class="title"><b>Example&nbsp;26.4.&nbsp;Stored Procedure</b></p><pre class="programlisting">&lt;cacheRegion name="Product" priority="High" &gt;
175175
&lt;dependencies&gt;
176176
&lt;commands&gt;
177177
&lt;add name="price"
178178
command="ActiveProductsStoredProcedure"
179179
isStoredProcedure="true"/&gt;
180180
&lt;/commands&gt;
181181
&lt;/dependencies&gt;
182-
&lt;/cacheRegion&gt;</pre></div><div class="example"><a name="d0e15475"></a><p class="title"><b>Example&nbsp;26.5.&nbsp;SELECT Statement</b></p><pre class="programlisting">&lt;cacheRegion name="Product" priority="High"&gt;
182+
&lt;/cacheRegion&gt;</pre></div><div class="example"><a name="d0e15600"></a><p class="title"><b>Example&nbsp;26.5.&nbsp;SELECT Statement</b></p><pre class="programlisting">&lt;cacheRegion name="Product" priority="High"&gt;
183183
&lt;dependencies&gt;
184184
&lt;commands&gt;
185185
&lt;add name="price"
@@ -199,10 +199,10 @@
199199
use for registering the cache dependency for change notifications. If no value is supplied for
200200
<tt class="literal">connectionName</tt>, the unnamed connection supplied by the provider will be
201201
used.
202-
</dd></dl></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e15531"></a>26.4.3.&nbsp;Aggregate Dependencies</h3></div></div><div></div></div><p>
202+
</dd></dl></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e15656"></a>26.4.3.&nbsp;Aggregate Dependencies</h3></div></div><div></div></div><p>
203203
Multiple cache dependencies can be specified. If any of the dependencies triggers a change
204204
notification, the data in the cache region will be invalidated. See the samples below.
205-
</p><div class="example"><a name="d0e15536"></a><p class="title"><b>Example&nbsp;26.6.&nbsp;Multiple commands</b></p><pre class="programlisting">&lt;cacheRegion name="Product"&gt;
205+
</p><div class="example"><a name="d0e15661"></a><p class="title"><b>Example&nbsp;26.6.&nbsp;Multiple commands</b></p><pre class="programlisting">&lt;cacheRegion name="Product"&gt;
206206
&lt;dependencies&gt;
207207
&lt;commands&gt;
208208
&lt;add name="price"
@@ -212,7 +212,7 @@
212212
command="Select quantityAvailable from dbo.VideoAvailability"/&gt;
213213
&lt;/commands&gt;
214214
&lt;/dependencies&gt;
215-
&lt;/cacheRegion&gt;</pre></div><div class="example"><a name="d0e15541"></a><p class="title"><b>Example&nbsp;26.7.&nbsp;Mixed</b></p><pre class="programlisting">&lt;cacheRegion name="Product"&gt;
215+
&lt;/cacheRegion&gt;</pre></div><div class="example"><a name="d0e15666"></a><p class="title"><b>Example&nbsp;26.7.&nbsp;Mixed</b></p><pre class="programlisting">&lt;cacheRegion name="Product"&gt;
216216
&lt;dependencies&gt;
217217
&lt;commands&gt;
218218
&lt;add name="price"
@@ -225,12 +225,12 @@
225225
tableName=" VideoAvailability" /&gt;
226226
&lt;/tables&gt;
227227
&lt;/dependencies&gt;
228-
&lt;/cacheRegion&gt;</pre></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e15546"></a>26.4.4.&nbsp;Additional Settings</h3></div></div><div></div></div><p>
228+
&lt;/cacheRegion&gt;</pre></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e15671"></a>26.4.4.&nbsp;Additional Settings</h3></div></div><div></div></div><p>
229229
In addition to data dependencies for the cache regions, time based expiration policies can be specified
230230
for each item added to the cache. Time based expiration policies will not invalidate the data
231231
dependencies for the whole cache region, but serve as a way to remove items from the cache after they
232232
have been in the cache for a specified amount of time. See the samples below.
233-
</p><div class="example"><a name="d0e15551"></a><p class="title"><b>Example&nbsp;26.8.&nbsp;Relative Expiration</b></p><pre class="programlisting">&lt;cacheRegion name="Product" relativeExpiration="300" priority="High" /&gt;</pre></div><div class="example"><a name="d0e15556"></a><p class="title"><b>Example&nbsp;26.9.&nbsp;Time of Day Expiration</b></p><pre class="programlisting">&lt;cacheRegion name="Product" timeOfDayExpiration="2:00:00" priority="High" /&gt;</pre></div><div class="variablelist"><p class="title"><b>Additional Configuration Properties</b></p><dl><dt><span class="term"><tt class="literal">relativeExpiration</tt></span></dt><dd><p>
233+
</p><div class="example"><a name="d0e15676"></a><p class="title"><b>Example&nbsp;26.8.&nbsp;Relative Expiration</b></p><pre class="programlisting">&lt;cacheRegion name="Product" relativeExpiration="300" priority="High" /&gt;</pre></div><div class="example"><a name="d0e15681"></a><p class="title"><b>Example&nbsp;26.9.&nbsp;Time of Day Expiration</b></p><pre class="programlisting">&lt;cacheRegion name="Product" timeOfDayExpiration="2:00:00" priority="High" /&gt;</pre></div><div class="variablelist"><p class="title"><b>Additional Configuration Properties</b></p><dl><dt><span class="term"><tt class="literal">relativeExpiration</tt></span></dt><dd><p>
234234
Number of seconds that an individual item will exist in the cache before being removed.
235235
</p></dd><dt><span class="term"><tt class="literal">timeOfDayExpiration</tt></span></dt><dd><p>
236236
24 hour based time of day that an item will exist in the cache until. 12am is specified as

doc/nhibernate-reference/collections.html

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
layout:
33
---
44
<!doctype html>
@@ -9,17 +9,14 @@
99
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
1010
<title>Chapter&nbsp;6.&nbsp;Collection Mapping</title><link rel="stylesheet" href="../shared/css/html.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="NHibernate - Relational Persistence for Idiomatic .NET"><link rel="up" href="index.html" title="NHibernate - Relational Persistence for Idiomatic .NET"><link rel="previous" href="mapping.html" title="Chapter&nbsp;5.&nbsp;Basic O/R Mapping"><link rel="next" href="components.html" title="Chapter&nbsp;7.&nbsp;Component Mapping"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;6.&nbsp;Collection Mapping</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mapping.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="components.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="collections"></a>Chapter&nbsp;6.&nbsp;Collection Mapping</h2></div></div><div></div></div>{% include google_adsense.html %}<div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="collections-persistent"></a>6.1.&nbsp;Persistent Collections</h2></div></div><div></div></div><p>
1111
NHibernate requires that persistent collection-valued fields be declared
12-
as an interface type, for example:
12+
as a generic interface type, for example:
1313
</p><pre class="programlisting">public class Product
1414
{
1515
public ISet&lt;Part&gt; Parts { get; set; } = new HashSet&lt;Part&gt;();
1616

1717
public string SerialNumber { get; set; }
1818
}</pre><p>
1919
The actual interface might be
20-
<tt class="literal">System.Collections.ICollection</tt>,
21-
<tt class="literal">System.Collections.IList</tt>,
22-
<tt class="literal">System.Collections.IDictionary</tt>,
2320
<tt class="literal">System.Collections.Generic.ICollection&lt;T&gt;</tt>,
2421
<tt class="literal">System.Collections.Generic.IList&lt;T&gt;</tt>,
2522
<tt class="literal">System.Collections.Generic.IDictionary&lt;K, V&gt;</tt>,
@@ -28,11 +25,11 @@
2825
have to write an implementation of <tt class="literal">NHibernate.UserType.IUserCollectionType</tt>.)
2926
</p><p>
3027
Notice how we initialized the instance variable with an instance of
31-
<tt class="literal">HashSet</tt>. This is the best way to initialize collection
28+
<tt class="literal">HashSet&lt;T&gt;</tt>. This is the best way to initialize collection
3229
valued properties of newly instantiated (non-persistent) instances. When
3330
you make the instance persistent - by calling <tt class="literal">Save()</tt>,
34-
for example - NHibernate will actually replace the <tt class="literal">HashSet</tt>
35-
with an instance of NHibernate's own implementation of <tt class="literal">ISet</tt>.
31+
for example - NHibernate will actually replace the <tt class="literal">HashSet&lt;T&gt;</tt>
32+
with an instance of NHibernate's own implementation of <tt class="literal">ISet&lt;T&gt;</tt>.
3633
Watch out for errors like this:
3734
</p><pre class="programlisting">Cat cat = new DomesticCat();
3835
Cat kitten = new DomesticCat();
@@ -157,9 +154,8 @@
157154
owning entity's version. (For one to many associations, it is often reasonable to
158155
disable this setting.)
159156
</p></td></tr><tr><td width="5%" valign="top" align="left">(14)</td><td valign="top" align="left"><p>
160-
<tt class="literal">generic</tt> (optional): Choose between generic and non-generic collection
161-
interface. If this option is not specified, NHibernate will use reflection to choose
162-
the interface.
157+
<tt class="literal">generic</tt> (optional, obsolete): Choose between generic and non-generic
158+
collection interfaces. But currently NHibernate only supports generic collections.
163159
</p></td></tr></table></div></div><p>
164160
The mapping of an <tt class="literal">IList</tt> or array requires a separate table column holding the array
165161
or list index (the <tt class="literal">i</tt> in <tt class="literal">foo[i]</tt>). If your relational model doesn't

doc/nhibernate-reference/components.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
layout:
33
---
44
<!doctype html>
@@ -154,7 +154,7 @@
154154
You may use a component as an identifier of an entity class. Your component
155155
class must satisfy certain requirements:
156156
</p><div class="itemizedlist"><ul type="disc" compact><li><p>
157-
It must be <tt class="literal">Serializable</tt>.
157+
It must be marked with the <tt class="literal">Serializable</tt> attribute.
158158
</p></li><li><p>
159159
It must re-implement <tt class="literal">Equals()</tt> and
160160
<tt class="literal">GetHashCode()</tt>, consistently with the database's

doc/nhibernate-reference/index.html

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)