fixed missing empty options for createCollection

This commit is contained in:
Thomas Risberg
2010-12-16 14:49:03 -05:00
parent 95ac7e638c
commit d28ee80efb

View File

@@ -189,7 +189,7 @@ public class MongoTemplate implements InitializingBean, MongoOperations {
*/ */
public DBCollection createCollection(String collectionName) { public DBCollection createCollection(String collectionName) {
try { try {
return getDb().createCollection(collectionName, null); return getDb().createCollection(collectionName, new BasicDBObject());
} catch (MongoException e) { } catch (MongoException e) {
throw new InvalidDataAccessApiUsageException("Error creating collection " + collectionName + ": " + e.getMessage(), e); throw new InvalidDataAccessApiUsageException("Error creating collection " + collectionName + ": " + e.getMessage(), e);
} }