`[2] InterpretationError("Error for binding \'4\': DomainError(ConversionFailure(\"record identifier\", \"assimilated record identifier\"))")` (after upgrade to beta)
See original GitHub issueI recently upgraded from the alpha to beta and followed the migration guides. When I start my app however I get the following error:
[2] Invalid `prisma.log.upsert()` invocation in
[2] /Users/cwd/src/calm/server/src/schema/Log.ts:34:29
[2]
[2] Error occurred during query execution:
[2] InterpretationError("Error for binding \'4\': DomainError(ConversionFailure(\"record identifier\", \"assimilated record identifier\"))")
[2] at PrismaClientFetcher.request (/Users/cwd/src/calm/node_modules/@prisma/client/runtime/index.js:1:51485)
[2] at processTicksAndRejections (internal/process/task_queues.js:93:5)
I’m guessing I’ve missed something in my schema, but if I run an introspection it looks the same to me. More than anything I feel like the above error could possibly be more helpful 😄
anyways, here is my current schema:
datasource postgresql {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
output = "../node_modules/@prisma/client"
}
model User {
id String @default(cuid()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
fireIdDev String? @unique
fireIdStage String? @unique
fireIdProd String? @unique
name String?
email String @unique
logs Log[] @relation("UserLogs")
projects Project[] @relation("CreatedProjects")
items Item[] @relation("OwnedItems")
itemsCreated Item[] @relation("CreatedItems")
}
model Item {
id String @default(cuid()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
isDeleted Boolean @default(false)
deletedAt DateTime?
// User relationships
creator User @relation("CreatedItems", fields: [creatorId], references: [id])
creatorId String
owner User @relation("OwnedItems", fields: [ownerId], references: [id])
ownerId String
// Item info
title String?
type ItemType
// Meta info
checkIn CheckIn? @relation("ItemCheckin", fields: [checkInId], references: [id])
checkInId String? @unique
// Where does this item live
log Log? @relation("ItemLog", fields: [logId], references: [id])
logId String?
project Project? @relation("ItemProject", fields: [projectId], references: [id])
projectId String?
// Timeline
previousItem Item? @relation("PreviousNext", fields: [previousItemId], references: [id])
nextItem Item? @relation("PreviousNext")
previousItemId String? @unique
lastItem Item? @relation("ItemHistory", fields: [lastItemId], references: [id])
history Item[] @relation("ItemHistory")
lastItemId String?
// Task Fields
isComplete Boolean @default(false)
completedAt DateTime?
}
model Log {
id String @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
owner User @relation("UserLogs", fields: [ownerId], references: [id])
ownerId String
type LogType
date String
items Item[] @relation("ItemLog")
}
model Project {
id String @default(cuid()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
isDeleted Boolean @default(false)
deletedAt DateTime?
title String
creator User @relation("CreatedProjects", fields: [creatorId], references: [id])
creatorId String
items Item[] @relation("ItemProject")
}
model CheckIn {
id String @default(cuid()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
item Item? @relation("ItemCheckin")
latitude Float
longitude Float
location String?
weather String?
}
enum ItemType {
A
B
C
D
}
enum LogType {
A
B
C
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:13 (4 by maintainers)
Top Results From Across the Web
prisma - `[2] InterpretationError ( "\ '4 \'바인딩 오류 : DomainError ...
... [2] [2] Error occurred during query execution: [2] InterpretationError("Error for binding \'4\': DomainError(ConversionFailure(\"record identifier\", ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I was able to resolve my issues by following @janpio suggestion on a different issue.
Modify your
schema.prismamodel relations to the ones described here: https://github.com/prisma/prisma/releases/tag/2.0.0-beta.1Edit: in particular this section => “New syntax for defining relations”
@jayanth1991 Thank you, I read it and it seems to be fixed for now.