[CSHARP-85] IdPropertyConvention is not working when using other name that is not "_id". Created: 25/Oct/10 Updated: 02/Apr/15 Resolved: 25/Oct/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Payut M | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
IdPropertyConvention is not working when using other name that is not "_id". I copy the UnitTest from CSharp77Test below but change _id to _id2, run and see the result. In MongoDB (currently bug), {"_id" : ObjectId("xxxxxxxxxxxxxxxxxx"), "_id2" : ObjectId("yyyyyyyyyyyy")}Expected: {"_id" : ObjectId("xxxxxxxxxxxxxxxxxx") }// with out _id2 private class Foo { public string Name { get; set; } public string Summary { get; set; }} [Test] var conventions = new ConventionProfile() collection.RemoveAll(); Summary = string.Format("Summary for Foo-{0} ", i) |
| Comments |
| Comment by Robert Stam [ 25/Oct/10 ] |
|
Fixed in master. |