1
我们有2个班,亲子流利NHibernate的一对多父删除
,家长有没有提到孩子,孩子在其流利的映射下定义:
References(x => x.Parent, "Parent_id").Not.Nullable();
当父记录被删除时,会生成以下错误:
The DELETE statement conflicted with the REFERENCE constraint "FKFF68C21EE06905B9". The conflict occurred in database "DatabaseName", table "dbo.tblChild", column 'Parent_id'.
The statement has been terminated.
什么是正确的映射,使家长的缺失,因为父模型没有共同财产选择类型的孩子?