zoukankan      html  css  js  c++  java
  • [备忘]NHibernate映射类型

    System.ValueType Mapping Types

    NHibernate Type.NET TypeDatabase TypeRemarks
    AnsiChar System.Char DbType.AnsiStringFixedLength - 1 char  
    Boolean System.Boolean DbType.Boolean Default when no type attribute specified.
    Byte System.Byte DbType.Byte Default when no type attribute specified.
    Char System.Char DbType.StringFixedLength - 1 char Default when no type attribute specified.
    DateTime System.DateTime DbType.DateTime - ignores the milliseconds Default when no type attribute specified.
    LocalDateTime System.DateTime DbType.DateTime - ignores the milliseconds Ensures the DateTimeKind is set to DateTimeKind.Local
    UtcDateTime System.DateTime DbType.DateTime - ignores the milliseconds Ensures the DateTimeKind is set to DateTimeKind.Utc
    Decimal System.Decimal DbType.Decimal Default when no type attribute specified.
    Double System.Double DbType.Double Default when no type attribute specified.
    Guid System.Guid DbType.Guid Default when no type attribute specified.
    Int16 System.Int16 DbType.Int16 Default when no type attribute specified.
    Int32 System.Int32 DbType.Int32 Default when no type attribute specified.
    Int64 System.Int64 DbType.Int64 Default when no type attribute specified.
    PersistentEnum A System.Enum The DbType for the underlying value. Do not specify type="PersistentEnum" in the mapping. Instead specify the Assembly Qualified Name of the Enum or let NHibernate use Reflection to "guess" the Type. The UnderlyingType of the Enum is used to determine the correct DbType.
    Single System.Single DbType.Single Default when no type attribute specified.
    Ticks System.DateTime DbType.Int64 type="Ticks" must be specified.
    TimeSpan System.TimeSpan DbType.Int64 Default when no type attribute specified.
    Timestamp System.DateTime DbType.DateTime - as specific as database supports. type="Timestamp" must be specified.
    TrueFalse System.Boolean DbType.AnsiStringFixedLength - 1 char either 'T' or 'F' type="TrueFalse" must be specified.
    YesNo System.Boolean DbType.AnsiStringFixedLength - 1 char either 'Y' or 'N' type="YesNo" must be specified.

    System.Object Mapping Types

    NHibernate Type.NET TypeDatabase TypeRemarks
    AnsiString System.String DbType.AnsiString type="AnsiString" must be specified.
    CultureInfo System.Globalization.CultureInfo DbType.String - 5 chars for culture Default when no type attribute specified.
    Binary System.Byte[] DbType.Binary Default when no type attribute specified.
    Type System.Type DbType.String holding Assembly Qualified Name. Default when no type attribute specified.
    String System.String DbType.String Default when no type attribute specified.

    Large Object Mapping Types

    NHibernate Type.NET TypeDatabase TypeRemarks
    StringClob System.String DbType.String type="StringClob" must be specified. Entire field is read into memory.
    BinaryBlob System.Byte[] DbType.Binary type="BinaryBlob" must be specified. Entire field is read into memory.
    Serializable Any System.Object that is marked with SerializableAttribute. DbType.Binary type="Serializable" should be specified. This is the fallback type if no NHibernate Type can be found for the Property.
    摘自:
    http://nhforge.org/doc/nh/en/#mapping-types
  • 相关阅读:
    bzoj 3727: Final Zadanie 思维题
    bzoj 2510: 弱题 概率期望dp+循环矩阵
    bzoj 1131: [POI2008]Sta DFS
    bzoj 3572: [Hnoi2014]世界树 虚树
    bzoj 3611: [Heoi2014]大工程 虚树
    bzoj 3545: [ONTAK2010]Peaks Kruskal重构树
    bzoj 2118: 墨墨的等式 spfa
    bzoj 1441: Min 裴蜀定理
    bzoj 4540: [Hnoi2016]序列 莫队
    bzoj 4034: 树上操作 线段树
  • 原文地址:https://www.cnblogs.com/llcto/p/2683214.html
Copyright © 2011-2022 走看看