Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10885

Change collection method syntax

    XMLWordPrintableJSON

Details

    Description

      "db.collection.count() " instead of "db.COLLECTION_NAME.count() " is misleading & cause problems

      Wrong command

      show dbs
      use database_name ( ex : myproject)
      db.collection.count() > gives 0 , wrong result

      correct command

      show dbs
      use database_name ( ex : myproject)
      show collections
      db.COLLECTION_NAME.count()

      I can see that a lot of people have face the same issue as me by looking at the number of question on same issue on stackoverflow .
      I posted a similar que :
      https://stackoverflow.com/questions/46654878/mongoose-save-function-is-not-persisting-in-local-mongodb

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 14 weeks, 6 days ago