我有兩個對象Customer_policy和policy_maturity。流利的nhibernate映射問題
public class Customer_policy
{
public virtual String policy_no { get; set; }
public virtual DateTime maturity_date { get; set; }
public virtual Boolean matured_status { get; set; }
}
public class Policy_maturity
{
public virtual string policy_no { get; set; }
public virtual string customer_id { get; set; }
public virtual float maturity_amt { get; set; }
public virtual string policy_type { get; set; }
public virtual DateTime pay_date { get; set; }
}
當客戶創建策略Customer_policy正在填充,但Policy_maturity應該保持爲空(我已經完成)。當策略成熟時,我想在Policy_maturity中插入一行,並更新相應Customer_policy的matured_status字段。我應該做什麼類型的映射,以便只通過一次點擊數據庫就可以完成插入和更新?感謝您的建議。