[JAVA-1065] DB.createCollection method doesn't create an empty collection Created: 24/Dec/13  Updated: 02/Jan/14  Resolved: 02/Jan/14

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: 2.10.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mukul Sharma Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows XP 32-Bit



 Description   

The below method,
DBCollection com.mongodb.DB.createCollection(String arg0, DBObject arg1)

doesn't create a new empty collection using java.

However, from the mongo shell, this command creates an empty collection.



 Comments   
Comment by Mukul Sharma [ 02/Jan/14 ]

I was passing the second parameter from java as null, which explains why the collections wasn't created.
My apologies . Kindly close this bug.

Comment by Jeffrey Yemin [ 30/Dec/13 ]

How are you calling this method? What are the contents of the DBObject that's the second parameter? What is the exact shell command that you are using?

Generated at Thu Feb 08 08:53:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.