What characters are NOT allowed in MongoDB field names?

前端 未结 2 405
不知归路
不知归路 2020-11-27 21:14

I figured out that of course . and SPACE aren\'t allowed. Are there other forbidden characters ?

2条回答
  •  春和景丽
    2020-11-27 21:34

    You can use any (UTF8) character in the field name which aren't special (contains ".", or starts with "$").

    https://jira.mongodb.org/browse/SERVER-3229

    https://stackoverflow.com/a/7976235/311220

    It's generally best to stick with lowercase alphanumeric with underscores though.

提交回复
热议问题