ホーム

mongoでObjectIdからfindする方法

db.test.find(ObjectId('4ecc05e55dd98a436ddcc47c'))

でいけますね。

リファレンス

[How do I search for an object by its ObjectId in the mongo console?](https://stackoverflow.com/questions/8233014/how-do-i-search-for-an-object-by-its-objectid-in-the-mongo-console)

-ホーム

Copyright© off , 2020 All Rights Reserved Powered by AFFINGER5.