[CSHARP-84] Id generation should only choose 1 id property per class Created: 22/Oct/10 Updated: 20/Mar/14 Resolved: 27/Oct/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 0.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Craig Wilson | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Given the following class: public class Student public ObjectId ParentId { get; set; } } Both of these will be considered an Id property and get automatically assigned. I personally believe that the driver needs to choose a convention by default and stick to it. For instance, id properties are always named Id unless overridden by an attribute, or a manual mapping. In addition, there needs to be a way to change the default convention to something like ID or {ClassName}Id. IIdSelectionConvention or something. |
| Comments |
| Comment by Craig Wilson [ 27/Oct/10 ] |
|
Fixed. |