Invoke onclose at the end of an array deleting

v2
Nikita Tokarchuk 4 years ago
parent 73dc4974a2
commit 50e947b203
  1. 2
      mongox/database/deletearray.go

@ -52,6 +52,8 @@ func (d *Database) DeleteArray(target interface{}, filters ...interface{}) (err
composed.And(primitive.M{"_id": primitive.M{"$in": ids}})
defer composed.OnClose().Invoke(ctx, target)
result, err := collection.DeleteMany(ctx, composed.M(), opts)
if err != nil {
return

Loading…
Cancel
Save