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'm testing some code that uses mongodb to find/update/delete objects looking them up by their _id. However as the tested code uses require('mongodb').ObjectID and mongo-mock uses a different version of it, the tested code can't find the objects. This is really annoying ...
The text was updated successfully, but these errors were encountered:
Noticing for myself that overriding ObjectID would be valuable in that I could make it deterministic for snapshots. This ObjectID is bson-objectid, in mongodb it is mongodb-core.BSON.ObjectID
I can see theres a pkFactory in CollectionState in db.js but it's not used by create_backingstore.
I'm testing some code that uses mongodb to find/update/delete objects looking them up by their _id. However as the tested code uses
require('mongodb').ObjectID
and mongo-mock uses a different version of it, the tested code can't find the objects. This is really annoying ...The text was updated successfully, but these errors were encountered: