v0.0.304 add support for WithModifyingPipeline
to wmo
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m22s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m22s
This commit is contained in:
@@ -14,9 +14,11 @@ func (c *Coll[TData]) InsertOne(ctx context.Context, valueIn TData) (TData, erro
|
||||
return *new(TData), exerr.Wrap(err, "mongo-query[insert-one] failed").Str("collection", c.Name()).Build()
|
||||
}
|
||||
|
||||
mongoRes := c.coll.FindOne(ctx, bson.M{"_id": insRes.InsertedID})
|
||||
|
||||
return c.decodeSingle(ctx, mongoRes)
|
||||
r, err := c.findOneInternal(ctx, bson.M{"_id": insRes.InsertedID}, false)
|
||||
if err != nil {
|
||||
return *new(TData), exerr.Wrap(err, "mongo-query[insert-one] failed").Str("collection", c.Name()).Build()
|
||||
}
|
||||
return *r, nil
|
||||
}
|
||||
|
||||
func (c *Coll[TData]) InsertMany(ctx context.Context, valueIn []TData) (*mongo.InsertManyResult, error) {
|
||||
|
Reference in New Issue
Block a user