Initializing[PAT.Dao.Domain.LicenseZone#1]-Illegally attempted to associate a proxy with two open Sessions
表MAP:
<?xml version="1.0" encoding="utf-8"?> <hibernate-mapping assembly="PAT.Dao" namespace="PAT.Dao.Domain" xmlns="urn:nhibernate-mapping-2.2"> <class name="Paid" table="PAT_PAID" schema="PATENT"> <id name="ID" type="Decimal"> <column name="ID" not-null="true" scale="0" sql-type="NUMBER" /> <generator class="sequence"> <param name="sequence">PAT_Seq_Paid</param> </generator> </id> <property name="UniPatentID" type="String"> <column name="UNIPATENTID" not-null="true" length="50" sql-type="NVARCHAR2" /> </property> <property name="PatentID" type="String"> <column name="PATENTID" not-null="true" length="50" sql-type="NVARCHAR2" /> </property> <property name="Name" type="String"> <column name="NAME" not-null="false" length="50" sql-type="NVARCHAR2" /> </property> <property name="IssuedDate" type="DateTime"> <column name="ISSUEDDATE" not-null="false" sql-type="DATE" /> </property> <property name="GotInformDate" type="DateTime"> <column name="GOTINFORMDATE" not-null="false" sql-type="DATE" /> </property> <property name="SpecifiedPayAmount" type="Decimal"> <column name="SPECIFIEDPAYAMOUNT" not-null="false" scale="0" sql-type="NUMBER" /> </property> <property name="ActualPayAmount" type="Decimal"> <column name="ACTUALPAYAMOUNT" not-null="false" scale="0" sql-type="NUMBER" /> </property> <property name="SpecifiedPayDate" type="DateTime"> <column name="SPECIFIEDPAYDATE" not-null="false" sql-type="DATE" /> </property> <property name="ActualPayDate" type="DateTime"> <column name="ACTUALPAYDATE" not-null="false" sql-type="DATE" /> </property> <property name="GotReceiptDate" type="DateTime"> <column name="GOTRECEIPTDATE" not-null="false" sql-type="DATE" /> </property> <property name="Note" type="String"> <column name="NOTE" not-null="false" length="255" sql-type="NVARCHAR2" /> </property> <property name="CreateDate" type="DateTime"> <column name="CREATEDATE" not-null="true" sql-type="DATE" /> </property> <property name="CreateUser" type="Decimal"> <column name="CREATEUSER" not-null="true" scale="0" sql-type="NUMBER" /> </property> <property name="ModifyDate" type="DateTime"> <column name="MODIFYDATE" not-null="false" sql-type="DATE" /> </property> <property name="ModifyUser" type="Decimal"> <column name="MODIFYUSER" not-null="false" scale="0" sql-type="NUMBER" /> </property> <many-to-one name="License" class="License" update="false" insert="false" property-ref="UniPatentID"> <column name="UNIPATENTID" not-null="false" length="50" sql-type="NVARCHAR2" /> </many-to-one> <many-to-one name="LicenseZone" class="LicenseZone"> <column name="ZONEID" not-null="true" scale="0" sql-type="NUMBER" /> </many-to-one> </class> </hibernate-mapping>
設置 lazy="false"