MongoDB repository save() method not working in certain cases

38 Views Asked by At

I am facing an issue with the save() method in MongoDB. The save() method is not working as expected in certain cases, causing data not to be saved.

I'm using [spring boot, mongo repository ]. I have verified that the code for updating the field is the correct. Other fields in the database are updating correctly, but only one specific field is not reflecting the changes in some cases.

I am printing the object which needs to be saved, which is showing correct data in logs, but that same object is not getting saved in database.

Additional Information: mongodb driver version 4.1.2 Java version 8


    device_integrations: {

            ios_health_kit: {
                detailed_sync_date: {
                   "sleep":date
                }
            }
        }

// device_integrations is the property of profile class.
profileRepository.save(profile);
0

There are 0 best solutions below