Skip to content

Commit

Permalink
coal: added note
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Nov 27, 2023
1 parent 94e9b54 commit 656c055
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coal/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ func ReverseSort(sort []string) []string {
}

// Apply will apply the provided update document to the specified model.
//
// Note: The update operator "$unset" will not work as expected on structs,
// because the fields will not be set to their zero values. Use the "$set"
// operator instead.
func Apply(model Model, update bson.M) error {
// skip if update is empty
if len(update) == 0 {
Expand Down

0 comments on commit 656c055

Please # to comment.