-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
Description
Bug description
This issue arise when i try to update an array of enum.
Here the request made by studio :
update "public"."User" set "roles" = cast($1 as "public"."Role[]") where "id" = $2 returning "onBoarded", "lastName", "firstName", "picture", "name", "email", "lastConnectedAt", "createdById", "id", "roles", cast(floor(extract(epoch from now()) * $3) as text) as "__ps_updated_at__"
I think it could be solve by changing "public"."Role[]" to "public"."Role"[]
Severity
🚨 Critical: Data loss, app crash, security issue
Reproduction
Simply try to edit an array of enum
Expected vs. Actual Behavior
Should work as before and i should be able to modify my enum via studio
Frequency
Consistently reproducible
Does this occur in development or production?
Only in development (e.g., CLI tools, migrations, Prisma Studio)
Is this a regression?
Yes, it was working with previous to 7 version of prisma
Workaround
Prisma Schema & Queries
Here
Prisma Config
model User {
id String @id @default(uuid()) @db.Uuid
roles Role[]
}
enum Role {
ADMIN
MANAGE
VISIT
}
Logs & Debug Info
// Debug logs here
Environment & Setup
- OS:
- Database:
- Node.js version:
Prisma Version
// Prisma version output
hakobpogh