clarify in README that replication is required for autoincrementing IDs

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-03-26 20:33:43 -04:00
parent 1c18fc2bf6
commit 325534a7d0
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -20,6 +20,20 @@ package tutorial
import "rockfic.com/orm"
```
## Convert your database to a replica set (if you haven't already)
this is **very important!!** otherwise, functionality like
auto-incrementing IDs will not be available.
add these lines to `mongod.conf`:
```
replication:
replSetName: "rs0"
```
of course, you can replace `rs0` with whatever name you want.
## Connect to the database
```go