简体   繁体   中英

MongoDB Java: How can I represent $in query in DBObject?

My schema looks like

Id:
date_created:
vars: {
      NAME:
      VALUE:
      EDITABLE:
      .....

}

I know that using command-line we can select range of documents like

.find({'Id': {$in: ['a', 'b', ...]}}) 

Is it possible to do something similar using DBObject ?

This is because I want to perform update on multiple documents, which have Id in a', 'b',' 'c', ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM