PersonWithIdPropertyOfTypeObjectId p4 = new PersonWithIdPropertyOfTypeObjectId();
p4.setFirstName("John");
p4.setAge(41);
template.insert(p4);
Query orQuery = new Query(new Criteria().orOperator(where("age").in(11, 21), where("age").is(31)));
List<PersonWithIdPropertyOfTypeObjectId> results = template.find(orQuery, PersonWithIdPropertyOfTypeObjectId.class);
assertThat(results.size(), is(3));
for (PersonWithIdPropertyOfTypeObjectId p : results) {
assertThat(p.getAge(), isOneOf(11, 21, 31));
}