Go Pro Sign Up Login

Buy Now and unlock this series

$

49

.99

$

39

.99

yours forever

Become a Pro and unlock everything

$

24

.99

per month

Basic Prisma Schema

In this video, we will start building our schema model and get a first look at our model using Prisma Studio.

https://www.prisma.io/studio

Downloads

Become a pro to download code and videos

Comments

Kris

7 months ago

Hey Ryan,

For the Directory model in the schema in this video, I'm getting a Ambiguous self relation detected. The fields 'parent' and 'directories' in model 'Directory' both refer to 'Directory'. If they are part of the same relation add the same relation name for them with '@relation(<name>)'.

The fix for me was to add the relation to the parent field too:

parent Directory? @relation("DirectoryToDirectory", fields: [parentId], references: [id])

Kris

7 months ago [edited]

Kris

7 months ago [edited]

Kris

7 months ago [edited]

Kris

7 months ago [edited]

Kris

7 months ago [edited]

Kris

7 months ago [edited]

Want to join the conversation?

Become a Pro member today!