matteosantama
matteosantama
PPrisma
Created by matteosantama on 1/20/2025 in #help-and-questions
Insert `Map` as `Json`
I have the schema
model Foo {
id Int @id @default(autoincrement())
fields Json
}
model Foo {
id Int @id @default(autoincrement())
fields Json
}
and I'd like to insert records with type { fields: Map<String, String> }[]. However I'm getting an error Type 'Map<string, string>' is not assignable to type 'JsonNull | InputJsonValue'. How can I get around this?
5 replies