在 ADF 中,如果多个表具有外键,我如何将数据插入到多个表中
我已经开始使用 ADF,有人可以告诉我在 ADF 中如何在多个表中插入数据(如果它们有外键)吗?
非常感谢你。
I have started working on ADF and can anybody inform me in ADF how can i insert data in multiple table if they have foreign key,please?
Thnak you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您说要将数据插入多个表时,您是指 ADF 表吗? af:桌子?或者您的意思是在数据模型中定义的 ViewObject (viewInstance) ?
您应该通过使用 ViewLinks 和 EntityAssociation 阅读有关 ADF 中主子关系的更多信息。尤其是这些业务组件是如何充分利用ADF中的级联插入的基础。
我使用“级联”这个词,因为如果我有一个 ViewObject,它有一个子 ViewObject,并且两者都有一个 viewLink,这当然让它们通过外键链接是有意义的。在插入子项时,假设设置了父项中的当前行,则子项将立即继承父项键作为其外键和扩展键。
我希望这有帮助。
-马文
When you say that you're inserting data to multiple tables, do you mean ADF Tables? af:table? Or do you mean ViewObject (viewInstance) defined in your datamodel?
You should read more regarding Master-Child relationship in ADF by using ViewLinks and EntityAssociation. Especially these business components are the foundation on how to fully utilize the cascading insert in ADF.
I am using the word "cascading" since if I have a ViewObject which has a child ViewObject and both has a viewLink, which of course would make sense to have them be linked by their foreign keys. On insert of the child assuming that your current row in the parent is set, the child will inherit right away the parent keys as its foreign as well as extended keys.
I hope that helps.
-Marvin