findOne()个
const solutionList = await CommentMicroserviceDB.collection('comments').findOne({organizationId: ObjectId('5eb393ee95fab7468a79d189')});
工作罚款:-
{
_id: 6364e934830dcc00b488848d,
type: 'DOUBTS',
typeId: 63622eb7ddf697001fdc7b0a,
organizationId: 5eb393ee95fab7468a79d189,
createdBy: 62d53063e34fe92f8a135818,
status: 'Active',
displayOrder: 2,
createdAt: 2022-11-02T09:27:25.000Z,
updatedAt: 2022-11-02T09:27:25.000Z,
text:'<!DOCTYPE html>\n<html>\n<head>\n</head>\n<body>\n<p>Notification beofer berrnern</p>\n</body>\n</html>'
}
find()个
const solutionList = await CommentMicroserviceDB.collection('comments').find({organizationId: ObjectId('5eb393ee95fab7468a79d189')});
But when I try with find()个 function is not working and give me:-
Cursor {
pool: null,
server: null,
disconnectHandler: Store { s: [Object], length: [Getter] },
bson: BSON {},
ns: 'comment_service.comments',
cmd:
{ find: 'comment_service.comments',
limit: 0,
skip: 0,
slaveOk: true },
options:
{ readPreference: [ReadPreference],
skip: 0,
limit: 0,
topology: [Server] },
.....
.....
sortValue: undefined }
100 FindOne函数工作正常,但发现不正常 我需要在此处查找,因为我需要具有给定组织ID的所有文档
有谁能告诉我 谢谢!