Add getDocument() and getArray() functions to the new Document class

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Major - P3
    • 3.10.0
    • Affects Version/s: 3.0.0
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the old api i had to make frequently casts like this

      BasicDBList points = ((BasicDBList) ((BasicDBObject) currentObject.get("poly")).get("coordinates"));
      

      If the Document class had functions like this

      Document getDocument(String key); <- sub document
      List<Document> getDocumentArray(String key); <- Array of sub documents
      List<Object> getArray(String key); <- Array of other objects
      

      i could avoid such casts

              Assignee:
              John Stewart (Inactive)
              Reporter:
              Peter
              None
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: