Prisma: using set on relationship


According to the docs, set should override an existing list with an entirely new list. Does this work on relationships, as well? It doesn’t seem to be working for me:

    where: { id },
    data: {
      fields: {
        set: [...fields]

Field "set" is not defined by type FieldUpdateManyInput at value.fields; did you mean upsert? (edited)


No, this is currently not supported for relations.

I created a feature request for this, would love to hear your input :slight_smile:


The set method is generated in the type?