From 0a312077d6c19d1305bcaf56fbd58f1662854361 Mon Sep 17 00:00:00 2001 From: or-else Date: Tue, 14 Apr 2020 18:28:31 +0300 Subject: [PATCH] don't attempt to generate default mongo _id --- server/store/types/types.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/store/types/types.go b/server/store/types/types.go index acd3fd604..9d209e143 100644 --- a/server/store/types/types.go +++ b/server/store/types/types.go @@ -299,9 +299,8 @@ func ParseP2P(p2p string) (uid1, uid2 Uid, err error) { // ObjHeader is the header shared by all stored objects. type ObjHeader struct { // using string to get around rethinkdb's problems with uint64; - // `bson:"_id"` tag is for mongodb to use as primary key '_id' - // 'omitempty' causes mongodb automaticaly create "_id" field if field not set explicitly - Id string `bson:"_id,omitempty"` + // `bson:"_id"` tag is for mongodb to use as primary key '_id'. + Id string `bson:"_id"` id Uid CreatedAt time.Time UpdatedAt time.Time