|
106 | 106 | <area id="hm5" coords="6 55"/>
|
107 | 107 | <area id="hm6" coords="7 55"/>
|
108 | 108 | <area id="hm7" coords="8 55"/>
|
109 |
| - </areaspec> |
110 |
| - <programlisting> |
111 |
| - <![CDATA[<hibernate-mapping |
| 109 | + </areaspec> |
| 110 | + <programlisting><![CDATA[<hibernate-mapping |
112 | 111 | schema="schemaName"
|
113 | 112 | default-cascade="none|save-update"
|
114 | 113 | auto-import="true|false"
|
|
681 | 680 |
|
682 | 681 | <para>
|
683 | 682 | 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 |
685 | 684 | fetch the "hi" value in a new transaction.
|
686 | 685 | </para>
|
687 | 686 | </sect3>
|
|
1198 | 1197 | </programlistingco>
|
1199 | 1198 |
|
1200 | 1199 | <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>, |
1202 | 1201 | <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. |
1204 | 1205 | </para>
|
1205 | 1206 |
|
1206 | 1207 | </sect2>
|
|
1433 | 1434 | attribute. (For example, to distinguish between <literal>NHibernateUtil.DateTime</literal> and
|
1434 | 1435 | <literal>NHibernateUtil.Timestamp</literal>, or to specify a custom type.)
|
1435 | 1436 | </para>
|
1436 |
| - |
| 1437 | + |
| 1438 | + <para> |
| 1439 | + See also <xref linkend="mapping-types" />. |
| 1440 | + </para> |
| 1441 | + |
1437 | 1442 | <para>
|
1438 | 1443 | The <literal>access</literal> attribute lets you control how NHibernate will access
|
1439 | 1444 | the value of the property at runtime. The value of the <literal>access</literal> attribute should
|
|
2584 | 2589 | <para>
|
2585 | 2590 | The <emphasis>basic types</emphasis> may be roughly categorized into three groups - <literal>System.ValueType</literal>
|
2586 | 2591 | 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<T></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. |
2589 | 2596 | </para>
|
2590 | 2597 | <table>
|
2591 | 2598 | <title>System.ValueType Mapping Types</title>
|
|
3251 | 3258 | NHibernate's schema evolution tools, to provide the ability to fully define
|
3252 | 3259 | a user schema within the NHibernate mapping files. Although designed specifically
|
3253 | 3260 | 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> |
3255 | 3262 | method is valid here (ALTERs, INSERTS, etc). There are essentially two modes for
|
3256 | 3263 | defining auxiliary database objects.
|
3257 | 3264 | </para>
|
|
0 commit comments