spring-projects/spring-data-mongodb#5037 (comment) proposes adding a feature to Spring Data MongoDB to verify an app's representation configuration against the entities that it will persist to MongoDB. Boot should provide a configuration property that can be used to turn this verification on/off.