title: How can we resolve : "the method insert(DBObject[]) in the type DBCollection is not applicable for the arguments (BasicDBObject)?
body: <p>Im using Mongodb with java and im trying to create a document :</p>
  
  <pre><code>// mongo-java-driver-2.10.1 version
  // create a document to store key and value
              BasicDBObject document = new BasicDBObject();
              document.put("name", "Yassine LD");
  
              BasicDBObject documentDetail = new BasicDBObject();
              documentDetail.put("addressLine1", "Sweet Home");
              documentDetail.put("addressLine2", "New Street");
              documentDetail.put("addressLine3", "CASABLANCA, MOROCCO");
  
              document.put("address", documentDetail);
  
              table.insert(document);
  </code></pre>
  
  <p>I got this error : The method insert(DBObject[]) in the type DBCollection is not applicable for the arguments (BasicDBObject)</p>