ofortuna
ofortuna

Reputation: 187

in ADF how can i insert data in multiple table if they have foreign key

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.

Upvotes: 0

Views: 2323

Answers (1)

Marvin Reyes
Marvin Reyes

Reputation: 36

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

Upvotes: 1

Related Questions