How to Ensure Numbers Are Always Stored as BSON Double in MongoDB with Mongoose

A deep dive into solving the integer vs. double type mismatch problem