See [httpmongo]https://github.com/golangframework/httpmongo/blob/master/collection.go for details
Mongodb provides a method of complete replacement based on _id I used the method of remove first, then insert to implement the save operation, which also ensures that data that meets the filter conditions will not be repeated multiple times.
I have solved it myself
See [httpmongo]https://github.com/golangframework/httpmongo/blob/master/collection.go for details
Mongodb provides a method of complete replacement based on _id
I used the method of remove first, then insert to implement the save operation, which also ensures that data that meets the filter conditions will not be repeated multiple times.