Replacing Leading Underscores
- Last Updated: December 15, 2016
- 1 minute read
- DataDirect Connectors
- JDBC
- MongoDB 6.0
- Documentation
MongoDB collections automatically include the _id field, and the driver, by default, maps this
field as an _ID column. Because some third party applications are unable to process
identifiers with a leading underscore, you may need to replace this leading underscore.
The LeadingUnderscoreReplacement configuration option allows you to replace leading
underscores with a string. For example, by specifying
LeadingUnderscoreReplacement=XX, the _id field becomes the XXID
column in the relational view of your data. In addition, any other fields or collections
with a leading underscore would be modified in the same manner.
For details, see "Identifiers" and "ConfigOptions" in the driver documentation.