You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use my own string id (is allowed in mongodb) as _id when saving documents, but library always try to convert that id to objectid and therefor it fails.
Hi @mfs-git i use my own string id in mongodb too, try this one:
inside json, instead to pass the id like {"_id" : ObjectId("000000000000000000000001")}
try send in this way: {"_id" : {"$oid" : "000000000000000000000001"}}
Activity
samuelpcabral commentedon May 14, 2019
Hi @mfs-git i use my own string id in mongodb too, try this one:
inside json, instead to pass the id like {"_id" : ObjectId("000000000000000000000001")}
try send in this way: {"_id" : {"$oid" : "000000000000000000000001"}}
mfatemipour commentedon Jul 17, 2019
Hi @samuelpcabral, I solve my problem with changing some code in project
https://github.com/mfs-git/Robotframework-MongoDB-Library/tree/c3fd2449cb398a652f71f8199742d791e27e16f7
But it is better to remain on main repositoy, I will try your solution, Thanks.