Hey guys, I am trying to use the new "createMany" ...
# orm-help
d
Hey guys, I am trying to use the new "createMany" feature to seed my database, however I get a typescript error(vscode and phpstorm) that it doesnt exist
Copy code
const PriceService = await prisma.priceService.createMany({
    data: [ ... ],
    skipDuplicates: true,
  })
"Property 'createMany' does not exist on type 'PriceServiceDelegate<RejectOnNotFound | RejectPerOperation>'." and its true, when i looked into the delegate, it has create, upsert etc, but createMany is missing. typescript version is 4.3 (editor uses correct one) Is this a library issue? Best regards, David
d
have you regenerated your prisma client?
prisma generate
๐Ÿ‘ 1
if so, try restarting your ide and see if that fixes
๐Ÿ‘ 1
d
yeah, i did both/restart laptop
d
hmmmm, what is your provider in your
schema.prisma
?
d
datasource db { provider = "sqlite" url = env("DATABASE_URL") } in local dev
d
aha, sqlite doesnt support createMany
๐Ÿ‘€ 1
d
ah, didnt see that in the docs
thank you โค๏ธ
its hard to find, I had this same issue once when writing seed files
d
also sqlite doesnโ€™t support enums so a think like that not allowed in sqlite
Copy code
enum Role {
  USER
  ADMIN
  DEVELOPER
}
๐Ÿ‘ 1
d
correct, you cannot do enums in sqlite
d
thank you guys