0

How to get list of record using _id, I've list of unique _ids in my arraylist, I want to pass all these ids in one shot to Mongodb query and get the list of records.

For Example: I've below Emp Ids:

  • 1232 2322 4344 2939

I want to get all these employee details in a single mongo query using java, is that achievable if yes can someone help how to do that in java?

Appreciated your help in advance!

learn java
  • 231
  • 3
  • 14
  • what error do you get when you pass the date1 as is ? – s7vr Oct 18 '16 at 20:11
  • Mongodb: 2016-10-18 15:23:53.549 WARN 38208 --- [pool-1-thread-1] o.mongodb.morphia.query.QueryValidator : Validation warnings: [Validation failed: 'Type java.util.Date may not be queryable with value '2016-07-28T04:00:00Z' with class java.lang.String'] – learn java Oct 18 '16 at 20:19
  • sorry, I mean when you pass the date1 as java util date. what error do you get ? – s7vr Oct 18 '16 at 20:43
  • this is a bad practice. you should never replace the existing question as this will make all the answers and comments invalid. Please create a new question and revert this to old question. – s7vr Oct 21 '16 at 11:59

0 Answers0