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
2.6.0 Broke some of my update queries #3497
Comments
Thanks for reporting this, certainly unexpected. Someone will look into this as soon as possible. Looks like an unwanted regression on first sight. |
Yes, I confirm... broke on my Schema: generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Customer {
id String @default(cuid()) @id
email String
name String?
address Json?
timezone String?
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
} Mutation: const customer = await prisma.customer.update({
data: {address},
...
}) Error:
|
Having (vaguely) similar errors after updating to 2.6.0 when updating a
I slightly changed my update call but I don't think that's the cause. I'm not willing to test to confirm this. |
Thanks for the issue, we now have a fix coming soon, so I'll update you when you can try it 😃 |
Is there any unreleased version that we can use in the meantime that fixes this issue? |
So we have a fix in our development build |
This fix is now available in the |
I updated Prisma to v2.6.1, removed my node-modules, run |
@JuanM04 could you post here what is the error and code? It would be awesome to have a minimal reproduction 😃 |
The error is the same that @fchu reported:
The problem happens when I try (using the example above): prisma.user.update({
where: {id: 1},
data: { imageUrl: null }
}) Before 2.6.0, that was working, but now it isn't |
Thanks @JuanM04 we will investigate that! |
We have a reproduction and are working on a fix. |
prisma 2.6.1 Mutation (object) |
I guess it is related to #3512 |
So we have a fix in our development build 2.6.2-dev.1 (not recommended for production usage) it will be part of the official 2.6.2 patch release soon. |
|
You guys forgot about upsert.
|
@kevrat Please open a new issue with a reproduction. I was unable to reproduce this. Also, make sure you ran |
This comment has been minimized.
This comment has been minimized.
Anyone using |
in v2.15.0 |
@redblue9771 Please open a new issue about this with a minimal reproduction. |
Bug description
Upgrading to 2.6.0 required me to rewrite my upsert/update queries.
After doing so, engine will complain about missing fields while compile-time check doesn't.
How to reproduce
Queries:
to
updateOne
:Expected behavior
Prisma information
2.5.1 to 2.6.0
Environment & setup
The text was updated successfully, but these errors were encountered: