[CSHARP-253] Insert and similar methods should enforce valid element names Created: 21/Jun/11 Updated: 02/Apr/15 Resolved: 04/Jul/11 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.1 |
| Fix Version/s: | 1.2 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Insert and similar methods should enforce valid element names, prohibiting things like fields starting with "$" or containing a ".". |
| Comments |
| Comment by Robert Stam [ 04/Jul/11 ] |
|
Further work done to allow CreateIndex to work with nested element names. CreateIndex calls Insert, so Insert has been modified to allow the caller to set CheckElementNames to false (see the new MongoInsertOptions class). While this was put in for CreateIndex, it also makes it possible for a developer to disable element name checking if necessary. |
| Comment by Robert Stam [ 03/Jul/11 ] |
|
See: http://groups.google.com/group/mongodb-user/browse_thread/thread/17c621d18130359c?hl=en# As currently implemented this prevents the creation of indexes that use nested element names (because of the "." in them). |
| Comment by Robert Stam [ 23/Jun/11 ] |
|
Implemented. |