Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

How to add the data to DB within a 2 tables 1-N relation?

Certified Senior Developer

Hi,

When I have to add data within a 1-1 relation between 2 tables, I call the "Write to data store entity" Smart Service to add the new record in the parent table and then, from this component output, I retrieve the generated key Id, to set the Foreign Key in the child table.
How would you do for a 1-N relation?
Is there any way to add the data in the 2 tables (1 record in the parent table, and N records in the child table) in a simple way without doing any loop to set the FK ? 
What is the better way to do it please ?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data