在NHibernate的 mapping xml 文件中

有些字段加了方括号引起来后,会引起错误

xxx.Framework.TestCase.TestNHibernate : NHibernate.ADOException : Unable to perform find
  ----> System.IndexOutOfRangeException : [TargetID0_]

NHibernate.ADOException : Unable to perform find<?xml version="1.0" encoding="utf-8" ?>
NHibernate.ADOException : Unable to perform find
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" namespace="AOP.Framework" assembly="AOP.Framework">
NHibernate.ADOException : Unable to perform find    
<class name="Target" table="Target" dynamic-update="true">
NHibernate.ADOException : Unable to perform find        
<id name="ID" column="[TargetID]" unsaved-value="0">
NHibernate.ADOException : Unable to perform find            
<generator class="native" />
NHibernate.ADOException : Unable to perform find        
</id>
NHibernate.ADOException : Unable to perform find        
<property name="Class" column="Class" not-null="true" length="255" />
NHibernate.ADOException : Unable to perform find        
<property name="Method" column="Method" not-null="true" length="255" />
NHibernate.ADOException : Unable to perform find        
<bag name="Roles" table="TARGET_ROLE" lazy="false">
NHibernate.ADOException : Unable to perform find            
<key column="TargetID" />
NHibernate.ADOException : Unable to perform find            
<many-to-many class="Role" column="RoleID" />
NHibernate.ADOException : Unable to perform find        
</bag>
NHibernate.ADOException : Unable to perform find    
</class>
NHibernate.ADOException : Unable to perform find
</hibernate-mapping>

相关文章:

  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2021-10-10
  • 2021-06-16
猜你喜欢
  • 2021-06-23
  • 2021-06-25
  • 2021-05-11
  • 2021-12-14
  • 2021-08-18
相关资源
相似解决方案