Polymorphism documentation should mention how to call RegisterDiscriminatorConvention

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Documentation
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Neither http://mongodb.github.io/mongo-csharp-driver/2.1/reference/bson/mapping/polymorphism/ nor http://mongodb.github.io/mongo-csharp-driver/2.1/reference/bson/mapping/conventions/ mention the correct way to register a DiscriminatorConvention. This led me to try adding a ScalarDiscriminatorConvention to a ConventionPack, which doesn't work – and I had to [ask a question on Stack Overflow](http://stackoverflow.com/q/33432899/2314532) before I could figure out how to register a DiscriminatorConvention properly. (My database used a field called "type" rather than "_t", hence my need for a different discriminator convention.)

      The reference documentation should probably be updated to mention this scenario, so that anyone else with similar needs will know how to do it in the future.

            Assignee:
            Unassigned
            Reporter:
            Robin Munn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: