panicked at 'Could not figure out an ID in create
See original GitHub issueBug description
This schema was produced by npx prisma db pull & npx prisma generate This same type of schema works on another table that was generated by npx
thread 'tokio-runtime-worker' panicked at 'Could not figure out an ID in create', query-engine\connectors\sql-query-connector\src\database\operations\write.rs:73:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PrismaClientUnknownRequestError:
Invalid `prisma.user_clock.create()` invocation:
How to reproduce
Expected behavior
Just insert row into table
Prisma information
model user_role {
id Int @id @unique(map: "iduser_role_UNIQUE") @default(dbgenerated("(concat(`user_id`,`role_id`))"))
user_id Int
role_id Int
role role @relation(fields: [role_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "role_id")
user user @relation(fields: [user_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "user_id")
@@index([role_id], map: "role_idx")
@@index([user_id], map: "user_idx")
}
model user_clock {
id Int @id @unique(map: "id_UNIQUE") @default(dbgenerated("(concat(`user_id`,`event_id`))"))
clock_in DateTime @db.DateTime(0)
clock_out DateTime? @db.DateTime(0)
user_id Int
event_id Int
event event @relation(fields: [event_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "event_id_clock")
user user @relation(fields: [user_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "user_id_clock")
@@index([event_id], map: "event_id_clock_idx")
@@index([user_id], map: "user_id_clock_idx")
}
Environment & setup
- OS:
- Database:
- Node.js version:
Prisma Version
3.0.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
PANIC: Could not figure out an ID in create #5086 - GitHub
Hi Prisma Team! My Prisma Client just crashed. This is the report: Versions Name Version Node v10.16.2 OS windows Prisma Client 2.9.0 Logs ......
Read more >prisma PANIC:could not figure out an ID in create
Prisma client just crashed with the following error : PANIC : could not figure out an ID in create .
Read more >Kernel Issues | OpenCore Install Guide - Dortania
For macOS Big Sur, many firmwares have issues determining the CPU core count and thus will kernel panic too early for screen printing....
Read more >Troubleshoot "Kernel panic" error after upgrading the kernel or ...
I'm receiving a "Kernel panic" error after I've upgraded the kernel or tried to reboot my EC2 Linux instance. How can I fix...
Read more >What To Do If You Lose Your Driver's License - Driving-Tests.org
Just follow the steps below and you'll be driving again in no time. ... If you can figure out how you lost your...
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 FreeTop 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
Top GitHub Comments
Ah got it like slack cool my bad
I edited your comment so the schema is formatted as code properly. Look at the edit of the comment to learn how I did it @ZacharyToney (triple backtick).