Data ModelingBSON Types — NumberLong vs Int32 vs Double
All courses

Types matter in queries

MongoDB distinguishes int32, int64, and double. A field stored as NumberLong(1) will not match { c: 1 } unless types align.

Rare tip: Standardize numeric types at write time — migrations fixing mixed types are painful at scale.

Output
Press Run to execute your code.