How to store zero leading numbers in mongoDB
I want to store numbers like 09876 in mongoDb
I am using a php driver and so far I have cast my numbers to (int), but I just noticed numbers that start with Zero and are not stored in mongo correctly and zero blobs!
So my mongo numbers are similar: NumberLong (9876) , but it should be: NumberLong (09876)
So, I know I can overlay my numbers on String and store them exactly as they are, but is there a way near this?
I mean i dont want to store numbers as strings in mongo db
something like casting to char ???
+3
user4099047
source
to share