prisma client generates model with no create
can anyone tell me why i dont get a prisma.session.create ?
Property 'create' does not exist on type 'SessionDelegate<DefaultArgs>'.ts(2339)
8 Replies
did you already make the prisma generate?
yes
when I Rename the table to something else - it works :shrug:
I dont know the reason, must have a restricted word in prisma for "Session"
don't have the docs page handy but generally if a
create
isn't generated that's because of an Unsupported
field. I see you have one but commented out, maybe it wasn't truly removed.Here is the docs reference:
https://www.prisma.io/docs/orm/reference/prisma-schema-reference#unsupported
Prisma Schema API | Prisma Documentation
API reference documentation for the Prisma Schema Language (PSL).
when that unsupported field was uncommneted, teh create would work, but absolutely zero crud stuff would work since prisma doesnt support spatial - since requested in 2020
Everything works fine now that the table is named Tokens :shrug:
I am glad to hear that now everything works!
Thanks but you might want to check out why the word Session/Sessions is somehow reserved