I have a collection as sample below
{
_id: ObjectId("60e8216624446e5662ebbcfb"),
appUserId: 'abc',
changeAmount: 1,
changeMultiplier: 1,
changeRoundOffUpTo: 100,
createdAt: 2021-07-09T10:13:58.671Z,
description: '',
roundUpAmount: 1,
status: 4,
updatedAt: 2022-01-06T04:03:20.163Z,
bucketId: ObjectId("60e80a4124446e5662e37abc"),
timestamp: 2021-07-09T10:13:58.671Z
}
So I get bucketId I have to find all the collections with that bucket Id we have something bucketId: mongoose_2.Types.ObjectId(bucketId) in mongo is there anything in java which can find by bucketId I tried with findAllByBucketId(Its taking only id not object")