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
No matter what this always comes back as an empty array and I am sure the document is in the database. When I pass the find function an ObjectID(), I get an error stating that the argument must be a string. I am able to find it in the console through this command.
@devdebonair
I found something that may help.
Passing an new ObjectID('random ObjectID') to find does work, but using the latest mongodb package is incompatible, switching to the same version camo is using (2.0.42) works.
import{ObjectID}from'mongodb';DB.then(()=>{Character.find({owner: newObjectID('some random ID')}).then(res=>res.map(u=>u.toJSON()))});
No matter what this always comes back as an empty array and I am sure the document is in the database. When I pass the find function an ObjectID(), I get an error stating that the argument must be a string. I am able to find it in the console through this command.
db.tickets.find({ "_id": ObjectId("random ObjectID") })
Any ideas why this may be happening?
The text was updated successfully, but these errors were encountered: