-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: D1 One-to-Many Relation INSERTs fail with The required connected records were not found.
when using indices
#23902
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
domain/client
Issue in the "Client" domain: Prisma Client, Prisma Studio etc.
kind/bug
A reported bug.
topic: d1
Issues related to Cloudflare D1
topic: driverAdapters
topic: @prisma/adapter-d1
Milestone
Comments
janpio
added
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
domain/client
Issue in the "Client" domain: Prisma Client, Prisma Studio etc.
topic: driverAdapters
topic: @prisma/adapter-d1
topic: d1
Issues related to Cloudflare D1
bug/2-confirmed
Bug has been reproduced and confirmed.
and removed
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
labels
Apr 22, 2024
Can reproduce with the provided https://github.com/hrueger/prisma-23902:
This theory sounds plausible and should be investigated. |
Jolg42
added a commit
that referenced
this issue
May 6, 2024
Because `rows_written` also counts the writes to an index. Fixes #23902 Closes https://github.com/prisma/team-orm/issues/1069
This was referenced Jun 5, 2024
This was referenced Jun 7, 2024
This was referenced Jul 17, 2024
This was referenced Jul 19, 2024
This was referenced Jul 20, 2024
This was referenced Aug 1, 2024
This was referenced Aug 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
domain/client
Issue in the "Client" domain: Prisma Client, Prisma Studio etc.
kind/bug
A reported bug.
topic: d1
Issues related to Cloudflare D1
topic: driverAdapters
topic: @prisma/adapter-d1
Bug description
When creating rows with a one-to-many relation and using manually added
@@index
s, the query fails with:I believe this happens due to D1 returning the number of rows written, including writes to index tables... not actual written data rows.
How to reproduce
See the reproduction here: https://github.com/hrueger/prisma-23902. Basically, you need
Expected behavior
It should connect the record.
I think I found two possible ways:
rows_written
orPrisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: