bsonx.Doc need to chang to use bson.D
Candy-Hixcare opened this issue · 3 comments
Candy-Hixcare commented
in adaper.go
keysDoc := bsonx.Doc{}
for _, k := range indexes {
keysDoc = keysDoc.Append(k, bsonx.Int32(1))
}
if _, err = collection.Indexes().CreateOne(
context.Background(),
mongo.IndexModel{
Keys: keysDoc,
Options: options.Index().SetUnique(true),
},
); err != nil {
return err
}
bsonx.Doc not exist any more
https://www.mongodb.com/docs/drivers/go/current/fundamentals/indexes/
mongo document update to use bson.D
casbin-bot commented
hsluoyz commented
@Candy-Hixcare hi, can you make a PR to fix it?
Candy-Hixcare commented
@hsluoyz ok, but I will change another account. I use'd wrong account :P
and than, I never use casbin may use more time :O