From 325534a7d0c6f6e248a68d4cd3097323e061ac0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 26 Mar 2025 20:33:43 -0400 Subject: [PATCH] clarify in README that replication is required for autoincrementing IDs --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 523d89d..bbde9fa 100644 --- a/README.md +++ b/README.md @@ -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