Problem with nested create

Hi

I have a table that has 2 relationships with a different table. When I try to do a nested create it fails saying it requires docGenerationId

Isn't it implied already?

The create command:
      const docGeneration = await prisma.docGeneration.create({
        data: {
          id,
          user: {
            connect: { id: user.id },
          },
          workspace: {
            connect: { id: workspaceId },
          },
          draftInput: {
            create: {
              id: inputId,
              settings,
            },
          },
        },
      })
Was this page helpful?