How to save multiple tables related to each other with Prisma
You can try out the following:
prisma.table2.create({
data: {
table1: {
createMany: {
data: [
{
secondaryfield: 'table1-1',
},
{
secondaryfield: 'table1-2',
},
],
}
}
}
})
More info here