又一个DeleteOnNull问题 [英] Yet another DeleteOnNull problem
本文介绍了又一个DeleteOnNull问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有表格" ParentTable"使用PK(parent_id)
和"ChildTable"使用PK(parent_id,row_id)
dbml为我生成一个类"ParentTable"具有关联属性"ChildTables"。
然后我尝试
代码块
解决方案
您无法在子项的已加载父项中删除您的子项。
尝试将您的代码修改为:
< p align = left>
Code Block 跨度>
Suppose that I have table "ParentTable" with PK ( parent_id )
and "ChildTable" with PK ( parent_id, row_id )
The dbml generates me a class "ParentTable" with association property "ChildTables".
Then I try to
Code Block解决方案You can't remove your child item in context with loaded parent item of the child.
Try to modify your code to this:
Code Block
这篇关于又一个DeleteOnNull问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆