[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, 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. |
| 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? |