Getting Started Documentation with MongoDB on Prisma should talk about Replica Set requirement (Epic 3)
See original GitHub issue~Currently our getting started guide assumes you know how to get a MongoDB connection URL from somewhere:~
- Update: we’ll do the above in the Prisma Data Guide because getting a connection URL is not only relevant to Prisma Users.
This assumes that the MongoDB url is configured as a replica set. The default local MongoDB does not work like this and you’ll end up with an error like this:
Transactions are not supported by this deployment
There’s a bunch of good suggestions in this issue on how to configure your local MongoDB to support the replicaset.
Extra: consider also updating Getting Started Guide example schema to use embedded types.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Using Prisma with MongoDB
When using transactions, MongoDB requires replication of your data set to be enabled. To do this, you will need to configure a replica...
Read more >Using MongoDB with Prisma - YouTube
MongoDB is currently supported as a preview feature in Prisma. In this video, Ryan Chenkie walks through how to use MongoDB in a...
Read more >MongoDB vs Realm | What are the differences? - StackShare
In Udemy there is a free course about it to get started. ... as it will support/guide you in creating a structured data...
Read more >Untitled
Crf450 parts for sale, To quoc goi ten minh dan truong karaoke, Backward induction 3 players, Jacques cartier facts timeline, All mobile themes...
Read more >Prisma Mongodb can't create a user model - Stack Overflow
I'm Running Mongodb 4+ version I solved it as below As the error describes you need to create a replica. Either you can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think we should document the current MongoDB docker compose setup Pierre created, it might be the easiest one command setup (if you have docker compose).
https://github.com/prisma/prisma/blob/main/docker/docker-compose.yml#L91-L99 So
Note I changed the port from current setup to use the default port (so we’ll need to do a quick check if that still works after, it should, but let’s verify)
https://github.com/prisma/prisma/blob/main/docker/mongodb_replica/Dockerfile
Note that this setup is only recommended for development.
@Jolg42 I tweaked the dockerfile to get it to work on my machine
bind_ip_allAn additional requirement when using replicaSet and no auth is to use the
directConnectionflag