私はこの状況に混乱しています。これらの2つのクラスを持つ:
public class Payment {
public Payment() { }
public string Trn { get; set; }
public TxType TxTypeId { get; set; }
public string TxCode { get; set; }
public System.Nullable<decimal> Amount { get; set; }
public System.Nullable<System.DateTime> DateStamp { get; set; } }
public PaymentAudit() { }
public System.DateTime DateStamp { get; set; }
public Payment Trn { get; set; }
public PaymentSaga PaymentStateId { get; set; }
public ProcessState ProcessState { get; set; }
public PublishState PublishState { get; set; }
public System.Nullable<short> ChgCount { get; set; }
public string UserName { get; set; }
マッピングは次のとおりです。
<class name="Payment" table="Payment" lazy="false" >
<id name="Trn">
<generator class="identity" />
</id>
<many-to-one insert="false" update="false" lazy="false" name="TxTypeId">
<column name="TxTypeId" sql-type="varchar" not-null="false" />
</many-to-one>
<property name="TxTypeId">
<column name="TxTypeId" sql-type="varchar" not-null="false" />
</property>
<many-to-one insert="false" update="false" lazy="false" name="TxCode">
<column name="TxCode" sql-type="varchar" not-null="false" />
</many-to-one>
<property name="TxCode">
<column name="TxCode" sql-type="varchar" not-null="false" />
</property>
<property name="Amount">
<column name="Amount" sql-type="decimal" not-null="false" />
</property>
<property name="DateStamp">
<column name="DateStamp" sql-type="datetime" not-null="false" />
</property>
<bag name="PaymentAudits" inverse="true" cascade="none">
<key column="Trn" />
<one-to-many class="PaymentAudit" not-found="ignore" />
</bag>
</class>
<class name="PaymentAudit" table="PaymentAudit" >
<composite-id>
<key-many-to-one name="PaymentStateId" column="PaymentStateId" />
<key-property name="DateStamp" column="DateStamp" />
<key-many-to-one name="ProcessState" column="ProcessState" />
</composite-id>
<property name="PublishState">
<column name="PublishState" sql-type="varchar" not-null="false" />
</property>
<many-to-one name="Trn">
<column name="Trn" sql-type="varchar" not-null="false" />
</many-to-one>
<property name="ChgCount">
<column name="ChgCount" sql-type="smallint" not-null="false" />
</property>
<property name="UserName">
<column name="UserName" sql-type="nvarchar" not-null="false" />
</property>
<many-to-one name="PublishState">
<column name="PublishState" sql-type="varchar" not-null="false" />
</many-to-one>
</class>
テーブル、
支払い:
Trn
PK
TxTypeId FK
TxCode FK
金額
DateStamp
PaymentAudit:
PaymentStateId PK
DateStamp PK
ProcessState PK
PublishState FK Trn
FK
ChgCount
UserName
そして、次のエラーが発生しました: 次 のタイプを判別できませんでした: MyProject.NHibernate.Payment.Model.Payment.Payment、MyProject.NHibernate.Payment.Model、Version=1.0.0.0、Culture=neutral、PublicKeyToken=null、列: NHibernate .Mapping.Column(Trn)
何か案は?ありがとう。