So I'm loading a document and several child docume...
# mongodb
m
So I'm loading a document and several child documents from my database, modifying both generations of documents programmatically depending what the end user clicks in the front end, and now I'm trying to save all the changes back to the database with as few database calls as possible. I'm getting errors when I just do
Copy code
prisma.parentDocument.update({
  where: {
    id: req.params.id
  },
  data: {
    ...req.body
  },
  select: {
    childDocuments: true
  }
});
, is there a way I can do all of these updates in one query?
āœ… 1
n
Hey there šŸ‘‹ sorry for the delay, were you able to resolve this issue by now? If no, it would be great if you could provide a bit more information about the problem so that we can try looking into this with you šŸ™‚ It would be helpful to see: • the relevant parts of the Prisma schema • content of the
req.body
• the error message you receive Ideally, you can create this as a new GitHub Discussion and we can help you there šŸ™‚
Hey @McKay Bonham šŸ‘‹ just following up here, did you get this resolved in the end? šŸ™‚