Option to save list or entity as DBRef

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.5
    • Component/s: Serialization
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Some kind of mapping that tells driver to store a document reference instead of plain document.

      Example

                  map.MapMember(x => x.UserOwner /*one user*/)
                      .SetIsReference("Users" /*collectionName*/)
                      .SetIsRequired(true);
      
                  map.MapMember(x => x.AssociatedProfiles /* many profiles */)
                      .SetIsReference("Profiles" /*collectionName*/)
                      .SetIsRequired(true);
      

      UserOwner returns User instead of MongoDBRef
      AssociatedProfiles returns IList<Profile> (instead of MongoDBRef[])

            Assignee:
            Robert Stam
            Reporter:
            Marcos Almeida Jr.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: