Helim
Helim
XXata
Created by Helim on 10/2/2024 in #help
Column is not an object or link
Hey I am trying to create an relation in my database schema. I am using Prisma ORM. Somehow this schema makes the xata.io table view break more specifically the view for Child table. It says "Error loading data... columns invalid: column [parentId]: column is not an object or link". I have done the modification thing that xata prompts me for when I first open the viewer I just have not pulled the schema to my prisma.schema as I thought it was more clear to only show the schema I wrote. What am I doing wrong? schema.prisma
model Parent {
id String @id @default(uuid())
name String
Child Child[]
}

model Child {
id String @id @default(uuid())
name String

parent Parent @relation(fields: [parentId], references: [id])
parentId String
}
model Parent {
id String @id @default(uuid())
name String
Child Child[]
}

model Child {
id String @id @default(uuid())
name String

parent Parent @relation(fields: [parentId], references: [id])
parentId String
}
3 replies