user not saving on mongodb but works fine with mysql
hi , i was using mysql and switched to test mongodb , followed the docs on mongodb and my User model looks as follow now :
and this is my controller ( using express and ts ):
i'm sure the code is fine but still i have no idea what's going on wrong in here , i did push and generate my prisma and i see the tables fine in my mongodb compass
any help is appreciated
Solution:Jump to solution
issue was with
Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set
configured my mongo and it worked fine...2 Replies
Solution
issue was with
Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set
configured my mongo and it worked fineReplica set is usually configured by default if you are using MongoDB Atlas. Were you using some other hosted services for your mongo database?