Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1715

API documentation change for class DBCollection

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.0.0, 2.14.0
    • 3.0.0
    • Documentation
    • None

    Description

      In the Javadoc for class DBCollection there is a mistake.

      It is written for an example on how to use the class:
      "MongoClient mongoClient = newMongoClient(newServerAddress("localhost", 27017));
      DB db = mongo.getDB("mydb");
      DBCollection collection = db.getCollection("test"); "

      BUT when initialising DB it should say:
      "DB db = mongoClient.getDB("mydb");"

      as the MongoClient variable name is "mongoClient" and not "mongo".

      Link to Javadoc: name.http://api.mongodb.org/java/current/com/mongodb/DBCollection.html

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            nyanchan Fabian Basciani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: