[CSHARP-841] Allow AutoIndexId and Capped to be set to false as well as true in CollectionOptionsBuilder Created: 14/Oct/13 Updated: 02/Apr/15 Resolved: 17/Oct/13 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.8.3 |
| Fix Version/s: | 1.9 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Roman Kuzmin | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
This native Mongo shell command works fine
i.e. a collection created with no index on `_id`. But I cannot achieve the same using
The index is always created. I took a look at the code: MongoDB.Driver\Builders\CollectionOptionsBuilder.cs(104):
It looks like `SetAutoIndexId(false)` makes the option removed, so that the Perhaps the correct code would be
which adds the option ` { autoIndexId: false }` explicitly, like the Mongo shell |
| Comments |
| Comment by auto [ 17/Oct/13 ] |
|
Author: {u'username': u'rstam', u'name': u'Robert Stam', u'email': u'robert@10gen.com'}Message: |
| Comment by Robert Stam [ 17/Oct/13 ] |
|
Edited the summary to indicate that this applies to both AutoIndexId and Capped. |