Spring Data mongo to insert null values to DB
问题 I am using Spring data mongo to insert a record to Mongo, here is my code mongoTemplate.save(person,"personCollection"); Here is my person object public class Person implements Serializable { int age; String address; String name; //Getters and setters including hashcode and equals } my address is null here , after inserting the record in the collection, the data is populated with only age and name i know that mongodb treats null value and noKey as the same thing, but my requirement is to even