[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 Id

{ get; set; }

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.

Generated at Wed Feb 07 21:35:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.