I want to create the following document schema in mongoDB using the java driver
{ \"_id\": { \"$oid\": \"513e9820c5d0d8b93228d7e8\" }, \"suitename\
Better use:
MongoClient client = new MongoClient("localhost",27017); MongoCollection collection = client.getDatabase("db").getCollection("collection"); List docs=new ArrayList<>(); docs.add(); collection.insertMany(docs); client.close();