<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="DomainModel.Entity.TblRole,DomainModel" table="TBL_ROLE" lazy="true">
<id name="Id" column="ID" type="Decimal">
<generator class="assigned" />
</id>
<property type="string" length="20" name="Name" column="`NAME`" />
<property type="DateTime" name="UpdateDate" column="`UPDATE_DATE`" />
<property type="Decimal" name="Index" column="`INDEX`" />
<property type="Decimal" name="Status" column="`STATUS`" />
<property type="string" length="200" name="Remark" column="`REMARK`" />
<bag name="FkTblRoleFkTblRoTblRole" inverse="true" lazy="true" cascade="all">
<key column="ROLE_ID" />
<one-to-many class="DomainModel.Entity.TblRoleRight,DomainModel" />
</bag>
<bag name="FkTblUserFkTblUsTblRole" inverse="true" lazy="true" cascade="all">
<key column="ROLE_ID" />
<one-to-many class="DomainModel.Entity.TblUser,DomainModel" />
</bag>
</class>
</hibernate-mapping>
看到了吧,是的仅仅是修改Column为 `列名`
本以为给Index(和Oracle的内置字段重名)设置就好了,结果发现不知为何还是报错,报错说是其他的字段也不行,于是乎就把整个表的字段都是用这个符号给替换了.