model Tag {
id Int @id @default(autoincrement())
category String // user, tree, etc.
value String
// All associated entities
trees TagTree[]
@@map("tag")
}
model Tree {
id Int @id @default(autoincrement())
name String
tags TagTree[]
@@map("tree")
}
model TagTree {
tag Tag @relation(fields: [tagId], references: [id])
tagId Int
tree Tree @relation(fields: [treeId], references: [id])
treeId Int
context Json
@@id([treeId, tagId])
@@map("tag_tree")
}
Now, I'm trying to seed the entities but I'm always running into Cannot read properties of undefined. I tried to use the most simple fixtures possible:
Hey,
I defined a many-to-many relationship here:
Now, I'm trying to seed the entities but I'm always running into
Cannot read properties of undefined
. I tried to use the most simple fixtures possible:My question is: Do you not support many-to-many relationships? Or what am I doing wrong here?
Best, René