IBeamMDAA V2版本中,由于變更了 當事人角色 的繼承機制,在添加 當事人角色時,為了 構建 當事人-當事人角色之間的關系,代碼如下:
?
?
//if (party.PartyRoles != null && !party.PartyRoles.Contains(sysUser))
?
//{
// ? ?party.PartyRoles.Add(sysUser);
//}
?
由于 party.PartyRoles 導致一次多態查詢,因此引起了以下錯誤:
?
An error occured when trying to dispose the transaction ---> NHibernate.StaleStateException: Batch update returned unexpected row count from update; actual row count: 0; expected: 1?
?
因此,在以后的代碼中,應該注意此代碼。?