I have 3 tables. (jobs, *jobQuestions*(that have j...
# orm-help
a
I have 3 tables. (jobs, *jobQuestions*(that have jobId) and *jobAnswers*(that have jobQuestionId)). How can I createMany JobAnswers using a Job object through JobQuestions?
r
@André Nogueira 👋 Do you want to create answers for all the questions for the specific job? If so, that is not possible currently. So something like this is possible:
Copy code
await prisma.job.update({
    where: { id: 1 },
    data: {
      questions: {
        update: { data: { answers: { create: [] } }, where: { id: 1 } },
      },
    },
  })