Skip to content

Commit 5f32eb3

Browse files
fredericDelaportehazzik
authored andcommitted
NH-3958 - documents missing types, fix broken link, removed broken link to a probably obsolete library. (#565)
1 parent 33f1962 commit 5f32eb3

File tree

6 files changed

+87
-22
lines changed

6 files changed

+87
-22
lines changed

doc/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# doc-level .gitignore.
2+
3+
NHibernate.shfbproj

doc/reference/master.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<bookinfo>
4040
<title>NHibernate - Relational Persistence for Idiomatic .NET</title>
4141
<subtitle>NHibernate Reference Documentation</subtitle>
42-
<releaseinfo>4.0</releaseinfo>
42+
<releaseinfo>5.0</releaseinfo>
4343
</bookinfo>
4444

4545
<toc />

doc/reference/modules/basic_mapping.xml

Lines changed: 68 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2622,6 +2622,12 @@
26222622
<entry><literal>DbType.StringFixedLength - 1 char</literal></entry>
26232623
<entry>Default when no <literal>type</literal> attribute specified.</entry>
26242624
</row>
2625+
<row>
2626+
<entry><literal>Currency</literal></entry>
2627+
<entry><literal>System.Decimal</literal></entry>
2628+
<entry><literal>DbType.Currency</literal></entry>
2629+
<entry><literal>type="Currency"</literal> must be specified.</entry>
2630+
</row>
26252631
<row>
26262632
<entry><literal>Date</literal></entry>
26272633
<entry><literal>System.DateTime</literal></entry>
@@ -2640,25 +2646,31 @@
26402646
<entry><literal>DbType.DateTime2</literal></entry>
26412647
<entry><literal>type="DateTime2"</literal> must be specified.</entry>
26422648
</row>
2649+
<row>
2650+
<entry><literal>DateTimeOffset</literal></entry>
2651+
<entry><literal>System.DateTimeOffset</literal></entry>
2652+
<entry><literal>DbType.DateTimeOffset</literal></entry>
2653+
<entry>Default when no <literal>type</literal> attribute specified.</entry>
2654+
</row>
26432655
<row>
26442656
<entry><literal>DbTimestamp</literal></entry>
26452657
<entry><literal>System.DateTime</literal></entry>
26462658
<entry><literal>DbType.DateTime</literal> - as specific as database supports.</entry>
26472659
<entry><literal>type="DbTimestamp"</literal> must be specified. When used as a <literal>version</literal> field, uses the database's current time rather than the client's current time.</entry>
26482660
</row>
2649-
<row>
2650-
<entry><literal>LocalDateTime</literal></entry>
2651-
<entry><literal>System.DateTime</literal></entry>
2652-
<entry><literal>DbType.DateTime</literal> - ignores the milliseconds</entry>
2653-
<entry>Ensures the <literal>DateTimeKind</literal> is set to <literal>DateTimeKind.Local</literal></entry>
2654-
</row>
2655-
<row>
2656-
<entry><literal>UtcDateTime</literal></entry>
2657-
<entry><literal>System.DateTime</literal></entry>
2658-
<entry><literal>DbType.DateTime</literal> - ignores the milliseconds</entry>
2659-
<entry>Ensures the <literal>DateTimeKind</literal> is set to <literal>DateTimeKind.Utc</literal></entry>
2660-
</row>
2661-
<row>
2661+
<row>
2662+
<entry><literal>LocalDateTime</literal></entry>
2663+
<entry><literal>System.DateTime</literal></entry>
2664+
<entry><literal>DbType.DateTime</literal> - ignores the milliseconds</entry>
2665+
<entry>Ensures the <literal>DateTimeKind</literal> is set to <literal>DateTimeKind.Local</literal></entry>
2666+
</row>
2667+
<row>
2668+
<entry><literal>UtcDateTime</literal></entry>
2669+
<entry><literal>System.DateTime</literal></entry>
2670+
<entry><literal>DbType.DateTime</literal> - ignores the milliseconds</entry>
2671+
<entry>Ensures the <literal>DateTimeKind</literal> is set to <literal>DateTimeKind.Utc</literal></entry>
2672+
</row>
2673+
<row>
26622674
<entry><literal>Decimal</literal></entry>
26632675
<entry><literal>System.Decimal</literal></entry>
26642676
<entry><literal>DbType.Decimal</literal></entry>
@@ -2699,9 +2711,15 @@
26992711
<entry>A <literal>System.Enum</literal></entry>
27002712
<entry>The <literal>DbType</literal> for the underlying value.</entry>
27012713
<entry>Do not specify <literal>type="PersistentEnum"</literal> in the mapping. Instead
2702-
specify the Assembly Qualified Name of the Enum or let NHibernate use Reflection to "guess" the Type.
2714+
specify the Assembly Qualified Name of the Enum or let NHibernate use Reflection to "guess" the Type.
27032715
The UnderlyingType of the Enum is used to determine the correct <literal>DbType</literal>.</entry>
27042716
</row>
2717+
<row>
2718+
<entry><literal>SByte</literal></entry>
2719+
<entry><literal>System.SByte</literal></entry>
2720+
<entry><literal>DbType.SByte</literal></entry>
2721+
<entry>Default when no <literal>type</literal> attribute specified.</entry>
2722+
</row>
27052723
<row>
27062724
<entry><literal>Single</literal></entry>
27072725
<entry><literal>System.Single</literal></entry>
@@ -2744,6 +2762,24 @@
27442762
<entry><literal>DbType.AnsiStringFixedLength</literal> - 1 char either 'T' or 'F'</entry>
27452763
<entry><literal>type="TrueFalse"</literal> must be specified.</entry>
27462764
</row>
2765+
<row>
2766+
<entry><literal>UInt16</literal></entry>
2767+
<entry><literal>System.UInt16</literal></entry>
2768+
<entry><literal>DbType.UInt16</literal></entry>
2769+
<entry>Default when no <literal>type</literal> attribute specified.</entry>
2770+
</row>
2771+
<row>
2772+
<entry><literal>UInt32</literal></entry>
2773+
<entry><literal>System.UInt32</literal></entry>
2774+
<entry><literal>DbType.UInt32</literal></entry>
2775+
<entry>Default when no <literal>type</literal> attribute specified.</entry>
2776+
</row>
2777+
<row>
2778+
<entry><literal>UInt64</literal></entry>
2779+
<entry><literal>System.UInt64</literal></entry>
2780+
<entry><literal>DbType.UInt64</literal></entry>
2781+
<entry>Default when no <literal>type</literal> attribute specified.</entry>
2782+
</row>
27472783
<row>
27482784
<entry><literal>YesNo</literal></entry>
27492785
<entry><literal>System.Boolean</literal></entry>
@@ -2796,6 +2832,12 @@
27962832
<entry><literal>DbType.String</literal></entry>
27972833
<entry>Default when no <literal>type</literal> attribute specified.</entry>
27982834
</row>
2835+
<row>
2836+
<entry><literal>Uri</literal></entry>
2837+
<entry><literal>System.Uri</literal></entry>
2838+
<entry><literal>DbType.String</literal></entry>
2839+
<entry>Default when no <literal>type</literal> attribute specified.</entry>
2840+
</row>
27992841
</tbody>
28002842
</tgroup>
28012843
</table>
@@ -2831,6 +2873,18 @@
28312873
<entry><literal>type="Serializable"</literal> should be specified. This is the fallback type
28322874
if no NHibernate Type can be found for the Property.</entry>
28332875
</row>
2876+
<row>
2877+
<entry><literal>XDoc</literal></entry>
2878+
<entry><literal>System.Xml.Linq.XDocument</literal></entry>
2879+
<entry><literal>DbType.Xml</literal></entry>
2880+
<entry>Default when no <literal>type</literal> attribute specified. Entire field is read into memory.</entry>
2881+
</row>
2882+
<row>
2883+
<entry><literal>XmlDoc</literal></entry>
2884+
<entry><literal>System.Xml.XmlDocument</literal></entry>
2885+
<entry><literal>DbType.Xml</literal></entry>
2886+
<entry>Default when no <literal>type</literal> attribute specified. Entire field is read into memory.</entry>
2887+
</row>
28342888
</tbody>
28352889
</tgroup>
28362890
</table>

doc/reference/modules/batch.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ session.Close();]]></programlisting>
158158
</listitem>
159159
<listitem>
160160
<para>
161-
No <link linkend="queryhql-joins-forms">joins</link> (either implicit or explicit)
161+
No <link linkend="queryhql-joins">joins</link> (either implicit or explicit)
162162
can be specified in a bulk HQL query. Sub-queries may be used in the where-clause;
163163
the subqueries, themselves, may contain joins.
164164
</para>

doc/reference/modules/nhibernate_mapping_attributes.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ public class Base {
164164
<listitem>
165165
<para>Instead of using a string for <methodname>DiscriminatorValue</methodname> (in <classname>[Class]</classname> and <classname>[Subclass]</classname>), you can use any object you want. Example: <programlisting>[Subclass(DiscriminatorValueEnumFormat="d", DiscriminatorValueObject=DiscEnum.Val1)]</programlisting> Here, the object is an Enum, and you can set the format you want (the default value is "g"). Note that you must put it <emphasis role="strong">before</emphasis>! For others types, It simply use the <methodname>ToString()</methodname> method of the object.</para>
166166
</listitem>
167-
<listitem>
168-
<para>If you are using members of the type <classname>Nullables.NullableXXX</classname> (from the library <link linkend="nullables">Nullables</link>), then they will be mapped to <classname>Nullables.NHibernate.NullableXXXType</classname> automatically; don't set <literal>Type="..."</literal> in <classname>[Property]</classname> (leave it null). This is also the case for <classname>SqlTypes</classname> (and you can add your own patterns). Thanks to <emphasis>Michael Third</emphasis> for the idea :)</para>
169-
</listitem>
170167
<listitem>
171168
<para>Each stream generated by NHibernate.Mapping.Attributes can contain a comment with the date of the generation; You may enable/disable this by using the property <methodname>HbmSerializer.WriteDateComment</methodname>.</para>
172169
</listitem>

src/NHibernate/NHibernateUtil.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ public static IType GuessType(System.Type type)
221221
public static readonly TicksType Ticks = new TicksType();
222222

223223
/// <summary>
224-
/// NHibernate Ticks type
224+
/// NHibernate TimeAsTimeSpan type
225225
/// </summary>
226226
public static readonly TimeAsTimeSpanType TimeAsTimeSpan = new TimeAsTimeSpanType();
227227

228228
/// <summary>
229-
/// NHibernate Ticks type
229+
/// NHibernate TimeSpan type
230230
/// </summary>
231231
public static readonly TimeSpanType TimeSpan = new TimeSpanType();
232232

@@ -278,13 +278,24 @@ public static IType GuessType(System.Type type)
278278
// /// </summary>
279279
// public static readonly NullableType Clob = new ClobType();
280280

281-
281+
/// <summary>
282+
/// NHibernate AnsiChar type
283+
/// </summary>
282284
public static readonly AnsiCharType AnsiChar = new AnsiCharType();
283285

286+
/// <summary>
287+
/// NHibernate XmlDoc type
288+
/// </summary>
284289
public static readonly XmlDocType XmlDoc = new XmlDocType();
285290

291+
/// <summary>
292+
/// NHibernate XDoc type
293+
/// </summary>
286294
public static readonly XDocType XDoc = new XDocType();
287295

296+
/// <summary>
297+
/// NHibernate Uri type
298+
/// </summary>
288299
public static readonly UriType Uri = new UriType();
289300

290301
/// <summary>

0 commit comments

Comments
 (0)