Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[],[],null,["# Supported MongoDB data types and drivers\n========================================\n\nThe following tables list supported MongoDB data types and drivers for\nFirestore with MongoDB compatibility.\n\nData types\n----------\n\nDocument `_id`\n--------------\n\nThe top-level `_id` field in a document must be one of the following types:\n\n- ObjectId\n- String\n- 64-bit Integer (long)\n- 32-bit Integer (int)\n- Double\n- Binary\n\n Binary data values used as the `_id` must not exceed 1500 bytes.\n\nOther BSON types are not supported.\n\nLanguages and MongoDB drivers\n-----------------------------\n\nFirestore with MongoDB compatibility supports the following driver versions:\n\nWhat's next\n-----------\n\n- Run the [Quickstart: Create a database and connect to it](/firestore/mongodb-compatibility/docs/create-and-query-database).\n- Learn about [Behavior differences](/firestore/mongodb-compatibility/docs/behavior-differences).\n- For a breakdown of supported features depending on MongoDB version, see\n - [Supported features: 8.0](/firestore/mongodb-compatibility/docs/supported-features-80)\n - [Supported features: 7.0](/firestore/mongodb-compatibility/docs/supported-features-70)\n - [Supported features: 6.0](/firestore/mongodb-compatibility/docs/supported-features-60)\n - [Supported features: 5.0](/firestore/mongodb-compatibility/docs/supported-features-50)\n - [Supported features: 4.0](/firestore/mongodb-compatibility/docs/supported-features-40)\n - [Supported features: 3.6](/firestore/mongodb-compatibility/docs/supported-features-36)"]]