Id generation should only choose 1 id property per class

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 0.5
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Robert Stam (Inactive)
            Reporter:
            Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: