Create DBRefs with conventions

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: 1.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Instead of polluting your model with MongoDB specific classes like MongoDBRef, you should be able to handle it via conventions. For example,
      If I have a model class with a foreign key reference like the following:
      public class Employee{
      public object Id;
      public object Manager_Id;
      }

      I can create a convention where "Manager" is the collection name and "Id" is the field to join on. When a save occurs, the driver can detect this convention and apply the $ref appropriately.

              Assignee:
              Robert Stam
              Reporter:
              Jon Eckstein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: