Skip to content

Commit 40c0ce0

Browse files
authored
Update nestjs.mdx (#472)
`@default(auth().id)` does not seem to be supported by prisma also made author and authorId optonal to align with the zModel code further down
1 parent cf7e449 commit 40c0ce0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/quick-start/nestjs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ model Post {
6969
updatedAt DateTime @updatedAt()
7070
title String
7171
published Boolean @default(false)
72-
author User @relation(fields: [authorId], references: [id])
73-
authorId Int @default(auth().id)
72+
author User? @relation(fields: [authorId], references: [id])
73+
authorId Int?
7474
}
7575
```
7676

0 commit comments

Comments
 (0)