|
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>
|
|
2643 | 2650 | </entry>
|
2644 | 2651 | <entry>
|
2645 | 2652 | 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. |
2647 | 2654 | </entry>
|
2648 | 2655 | </row>
|
2649 | 2656 | <row>
|
|
2652 | 2659 | <entry>
|
2653 | 2660 | <literal>DbType.DateTime</literal> / <literal>DbType.DateTime2</literal><coref linkend="basic_mapping.datetime-co" />
|
2654 | 2661 | </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> |
2656 | 2666 | </row>
|
2657 | 2667 | <row>
|
2658 | 2668 | <entry><literal>DateTime2</literal></entry>
|
|
2727 | 2737 | <literal>type="LocalDateTime"</literal> must be specified. Ensures the
|
2728 | 2738 | <literal>DateTimeKind</literal> is set to <literal>DateTimeKind.Local</literal>.
|
2729 | 2739 | 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. |
2731 | 2741 | </entry>
|
2732 | 2742 | </row>
|
2733 | 2743 | <row>
|
|
2738 | 2748 | </entry>
|
2739 | 2749 | <entry>
|
2740 | 2750 | <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. |
2742 | 2753 | </entry>
|
2743 | 2754 | </row>
|
2744 | 2755 | <row>
|
|
2829 | 2840 | <entry>
|
2830 | 2841 | Ensures the <literal>DateTimeKind</literal> is set to <literal>DateTimeKind.Utc</literal>.
|
2831 | 2842 | 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. |
2833 | 2844 | </entry>
|
2834 | 2845 | </row>
|
2835 | 2846 | <row>
|
|
2840 | 2851 | </entry>
|
2841 | 2852 | <entry>
|
2842 | 2853 | <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. |
2844 | 2856 | </entry>
|
2845 | 2857 | </row>
|
2846 | 2858 | <row>
|
|
3251 | 3263 | NHibernate's schema evolution tools, to provide the ability to fully define
|
3252 | 3264 | a user schema within the NHibernate mapping files. Although designed specifically
|
3253 | 3265 | 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> |
3255 | 3267 | method is valid here (ALTERs, INSERTS, etc). There are essentially two modes for
|
3256 | 3268 | defining auxiliary database objects.
|
3257 | 3269 | </para>
|
|
0 commit comments