当 IDENTITY_INSERT 设置为 OFF 时,不能为表中的标识列插入显式值

http://www.cnblogs.com/xgcblog/archive/2011/08/10/2133974.html

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
    <class name="TestHibernateExpre.Entities.OrderListModel,TestHibernateExpre" table="OrderList">
        <id name="Orderid" column="id" type="int">
            <!--id中参数的设置问:native/assigned/foreign/increment-->
            <generator class=" native"></generator>
        </id>
      </class>

你可能感兴趣的:(insert)