Mongodb converting double 250.0 to int 250 while saving data

I am trying to save a decimal data from spring boot to mongo db . When i give suppose 250.6 the data is saved perfectly but when i give 250.0 the data is getting saved as 250. I have checked whether the conversion was done in spring but thats not the case as just befor saving the data is still 250.0 only in spring but in db its 250 of type int32 wheras 250.6 is double

1 Like