using mongo java driver I am able to sort like so:
.sort(new BasicDBObject("firstColumn",1));
How do I sort by two fields?
You can try something like below.
.sort(new BasicDBObject("firstColumn", 1).append("SecondColumn", 1));