From 44881dff1e9f7327040747214ee7299b3640c333 Mon Sep 17 00:00:00 2001 From: Caique de Castro Date: Thu, 22 Dec 2016 16:35:10 -0200 Subject: [PATCH] Add note about collections beginning with numbers If a collection name begins with a number, eg. 2custom, you cannot access the collection as db.2custom.find(), instead you must use db.getCollection('2custom'). --- source/reference/limits.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/reference/limits.txt b/source/reference/limits.txt index 3df50d8372b..08df920e2ae 100644 --- a/source/reference/limits.txt +++ b/source/reference/limits.txt @@ -79,9 +79,9 @@ Naming Restrictions - begin with the ``system.`` prefix. (Reserved for internal use.) If your collection name includes special characters, such as the - underscore character, then to access the collection use the - :method:`db.getCollection()` method in the :program:`mongo` shell or - a :api:`similar method for your driver <>`. + underscore character, or begins with numbers, then to access the + collection use the :method:`db.getCollection()` method in the + :program:`mongo` shell or a :api:`similar method for your driver <>`. .. include:: /includes/fact-collection-namespace-limit.rst