how do i prisma
given this model
i am executing this create
which results in this error
the userId and challengeId are both valid
seems like this should work?
7 Replies
idk, this kinda looks like a problem with Prisma - the data you provided should match the
VoteUncheckedCreateInput
type, but the error you're getting is Prisma expecting a VoteCreateInput
. Using connect
and doing relation stuff would probs work but it's odd that it won't let u just put the foreign keys
ok nevermind i guess UncheckedCreate
doesn't allow setting foreign keys
i swear that's how it used to be but ¯\_(ツ)_/¯
yeah nvm i'm thinking of VoteCreateManyInput
- connect
it is for you thenthanks all.
hmm no dice, ill report back. looks like post 2.1 you shouldnt have to write connect based on the docs
nm i had to delete node modules ......
@trash_dev does that userId exist in the User table?
yeah.. the problem was fixed after i blew and recreated node_modules...smh
all my original code was fine
and didnt need connect
weird i wonder if something broke when your last npm install ran. Since NPM Install calls prisma generate.
lmaooo rip