is that possible?
# orm-help
h
is that possible?
j
Should be.
Technically you will have a relation scalar field which is a unique identifier, and then a relation field which uses that as it's
fields
in the
@relation
that points to some other model.
h
yeah did that, but seems to complain.
Having a schema like this:
Copy code
model match {
  id                Int                 @id @default(autoincrement())
  createdAt         DateTime            @default(now())

  session_id        BigInt              @unique
  session_key       String
  arbitrated        arbitrated?
}

model arbitrated {
  id                Int                 @id @default(autoincrement())
  createdAt         DateTime            @default(now())
  match             match               @relation(fields: [matchId], references: [id])
  matchId           Int                 @unique

  session_id        BigInt              @unique
  stat              stat[]
}
I get this:
@janpio Any idea why this is not working?