Open mahdiboomeri opened 2 years ago
Could you share your Prisma schema, or the relevant part of it where the field is declared? Thanks!
model UserMeta {
id Int @id @default(autoincrement())
User User @relation(fields: [userId], references: [id])
userId String
key String
value Json
@@unique([userId, key])
@@index([userId])
}
await prisma.userMeta.create({
data: {
userId,
key: 'isFoo',
value: true,
},
});
await prisma.userMeta.create({
data: {
userId,
key: 'isBar',
value: "foo",
},
});
Thanks for the extra info. This does indeed look like a bug, I've added it to our backlog.
Bug description
In Prisma Studio,
string
andboolean
values for JSON field are treated as invalid (with the styling), although they are valid in MySQL (no error or warning when running the queries).How to reproduce
Expected behavior
No response
Prisma information
Environment & setup
Prisma logs
No response