How to insert null values in MongoDb in Spring Data using Java

Hi All I am working on an application in which I am regularly inserting data reading from a file on a server. The null values are automatically vanished or not stored in the DB, My usecase is to show the null fields with value as null. Please help me on this. I am using java and spring boot in my application and i am calling saveAll method to insert into DB.

1 Like

Is this issue fixed?

Try using mongo client instead of spring data

use @Nullable on the field class