PrismaP
Prisma11mo ago
5 replies
Shishigami

Relation missing in UncheckedCreateInput

I have this model:

model Configuration {
  appId   String   @unique
  predecessedById   String?   @unique
  predecessedBy  Configuration?   @relation("PredecessedBy", fields: [predecessedById], references: [appId])
  successedBy   Configuration?   @relation("PredecessedBy")
}


and I would like to create a configuration like so:

db.configuration.create({
  data: {
    appId: '...',
    predecessedBy: {
      connect: {
        appId: '...'
      }
    }
  }
});


However predecessedBy does not exist on the UncheckedCreateInput type, instead there is only successedBy. Why is that and what do I have to change? The Update type has both
Was this page helpful?