i want to do $ne operation, but i have not found a criteria match it.
and the in ,nin seems working incorrectly, i insert 4 persons
when i use in operation, it print noneCode:Person p1 = new Person("Bob", 33); mongoTemplate.insert(p1); Person p2 = new Person("Mary", 25); mongoTemplate.insert(p2); Person p3 = new Person("Chris", 68); mongoTemplate.insert(p3); Person p4 = new Person("Janet", 29); mongoTemplate.insert(p4);
and when i use nin operation, it print the all personsCode:List l = Arrays.asList(25); List<Person> ps = mongoTemplate.find(new Query(where("age").in(l)), Person.class); for(Person s : ps) { System.out.println(s); }
thank you for help!


Reply With Quote