Skip to content

Commit

Permalink
don't attempt to generate default mongo _id
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Apr 14, 2020
1 parent d047cd6 commit 0a31207
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/store/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a31207

Please sign in to comment.