khris
khris
PPrisma
Created by khris on 8/3/2024 in #help-and-questions
Type 'Promise<string>' is not assignable to type 'string'
No description
3 replies
PPrisma
Created by khris on 4/8/2024 in #help-and-questions
i want a field to be an array in my mysql schema
I've created my model but in the image field I want it to be an array, so I can insert many images. Is there a solution? generator client { provider = "prisma-client-js" } datasource db { provider = "mysql" url = env("DATABASE_URL") } model Product { id Int @id @default(autoincrement()) title String description String category String price Float imageURL String clientId Int createdAt DateTime @default(now()) updatedAt DateTime @default(now()) client Client @relation(references: [id], fields: [clientId], onDelete: Cascade) @@map("products") } If I write "[]" next to imageURL I get an error: Field "imageURL" in model "Product" can't be a list. The current connector does not support lists of primitive types.Prisma
4 replies