Antoin Campbell
11/16/2021, 2:08 AMmodel User {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
firstName String?
lastName String?
email String? @unique
profile Profile?
role UserRole @default(USER)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([id, email])
}
model Profile {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
user User @relation(fields: [userId], references: [id])
userId String @db.Uuid
displayName String? @unique
biography String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
im trying to access user.profile
and it is telling me that the property profile does not exist on the model user. im having trouble understanding why this isnt possible or the right way to do thisRyan
11/16/2021, 6:31 AMAntoin Campbell
11/16/2021, 2:46 PMAntoin Campbell
11/16/2021, 2:47 PMRyan
11/17/2021, 9:02 AM