0

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")

Gibbs
  • 21,904
  • 13
  • 74
  • 138
  • Does this help https://stackoverflow.com/questions/9797935/how-to-query-documents-using-id-field-in-java-mongodb-driver – Charchit Kapoor May 26 '22 at 09:45
  • Does this answer your question? [Mongo Java query for and/or combination](https://stackoverflow.com/questions/30236639/mongo-java-query-for-and-or-combination) – Gibbs May 26 '22 at 10:20

0 Answers0