title: Adding a new field with default value in a collection in Spring Data MongoDB
body: <p>I am adding a new boolean field in a collection by adding an attribute to a Java Class entity that is being used in the MongoRepository interface. However, the existing documents' new field is being initialised as null in the database. I want the new field's default value in existing documents to be set to false. How can this be done in Spring Data MongoDB?</p>