P
Prisma4mo ago
thai

Can't see relation field in Types

Hi, How do I make stages visible in my code? (What I mean is in the image attached, stages doesn't appear on the types for ProjectPage.)
model ProjectPage {
id String @id @default(auto()) @map("_id") @db.ObjectId
stages ProjectStage[]
pageName String
Project Project @relation("project_projectpage", fields: [projectId], references: [id])
projectId String @db.ObjectId

lastUpdatedAt DateTime
}
model ProjectPage {
id String @id @default(auto()) @map("_id") @db.ObjectId
stages ProjectStage[]
pageName String
Project Project @relation("project_projectpage", fields: [projectId], references: [id])
projectId String @db.ObjectId

lastUpdatedAt DateTime
}
No description
2 Replies
moosthuizen
moosthuizen4mo ago
@thai Where is ProjectPage defined (being imported from)? If you are importing it from one of the types generated by Prisma Client, make sure to generate the client every time after making schema changes. If you are manually defining a ProjectPage type/interface, you will need to update this every time your schema.
thai
thaiOP4mo ago
Yep this is even after I run npx prisma generate
Want results from more Discord servers?
Add your server