zhaoyi0113 / mongodb-runner

Other
18 stars 5 forks source link

db.getCollection() is not a function #121

Closed zoujialing125 closed 4 years ago

zoujialing125 commented 4 years ago

The extension cannot execute the function db.getCollection(), as our collection name contains special chars we must must use getCollection to get doc correctly. Is there any solution to fix that problem?

but it's wired that if we don't put any filter information in find(), it works correctly.

zhaoyi0113 commented 4 years ago

Hi @zoujialing125 , could you provide me the command you run which causing the issue? And your collection name, and the find() command which runs correctly?

zoujialing125 commented 4 years ago

Hi @zhaoyi0113 , thanks for your swift reply. I think I made a mistake to use collection().find() with wrong collection name, so i cannot get expected result. My collection name is xxx-xxx-xxx, it's actually worked very well, no need getCollection function at all.