#Nested UpdateMany expects a where object

2 messages · Page 1 of 1 (latest)

tight canyon
#

Hi, when trying to update an entity and nested entities using updateMany, typescript enforce me to add a where clause even if I want to update all the nested entities.
Is this correct?
is there any docs that indicates why?
should I add an empty where for all the nested entities to be updated?

return this.data.quoteRequest.update({
      where: { id: quoteRequestId },
      data: {
        status: QuoteRequestStatus.Cancelled,
        submittedQuotes: {
          updateMany: {
            data: {
              status: QuoteSubmissionStatus.Rejected,
            },
          },
        },
      },
    });
signal seal
#

Hello 👋

Can you please share your schema file?