Skip to content

Commit

Permalink
Update 400-self-relations.mdx (#5455)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk authored Nov 16, 2023
1 parent 51ebc3e commit 1d255d2
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,17 @@ If you need the relation to hold other fields, you can create an [explicit](many
model User {
id Int @id @default(autoincrement())
name String?
followedBy Follows[] @relation("following")
following Follows[] @relation("follower")
followedBy Follows[] @relation("followedBy")
following Follows[] @relation("following")
}
model Follows {
follower User @relation("follower", fields: [followerId], references: [id])
followerId Int
following User @relation("following", fields: [followingId], references: [id])
followingId Int
followedBy User @relation("followedBy", fields: [followedById], references: [id])
followedById Int
following User @relation("following", fields: [followingId], references: [id])
followingId Int
@@id([followerId, followingId])
@@id([followingId, followedById])
}
```

Expand Down

1 comment on commit 1d255d2

@vercel
Copy link

@vercel vercel bot commented on 1d255d2 Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./

prisma2-docs.vercel.app
docs-prisma.vercel.app
docs-git-main-prisma.vercel.app

Please sign in to comment.