<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:06 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-1258] Sometimes the driver reports: BsonSerializationException</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1258</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;We insert two types of data to mongodb: AaaChange and InferredChange. They both are derived from the base type Change. But when we query them out occasionally we get error: Unknown discriminator value &apos;InferredChange&apos;. Attached are the code we used to query mongodb and the exception stack.&lt;/p&gt;
</description>
                <environment>Windows</environment>
        <key id="200517">CSHARP-1258</key>
            <summary>Sometimes the driver reports: BsonSerializationException</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="jcheng@medassets.com">John Cheng</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Apr 2015 15:10:10 +0000</created>
                <updated>Tue, 5 Apr 2016 00:28:45 +0000</updated>
                            <resolved>Wed, 17 Jun 2015 13:57:06 +0000</resolved>
                                    <version>1.9.2</version>
                                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="898795" author="craiggwilson" created="Mon, 27 Apr 2015 15:18:43 +0000"  >&lt;p&gt;Hi John,&lt;/p&gt;

&lt;p&gt;It is important when working with discriminated types that they are all registered before their use. For instance, if you try and run a query that returns an InferredChange instance before the driver is aware of the InferredChange type, we don&apos;t know how to instantiate it.&lt;/p&gt;

&lt;p&gt;Have a read of the documentation here: &lt;a href=&quot;http://mongodb.github.io/mongo-csharp-driver/1.10/serialization/#polymorphic-classes-and-discriminators&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongodb.github.io/mongo-csharp-driver/1.10/serialization/#polymorphic-classes-and-discriminators&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please let me know if this fixes your issue.&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="72010" name="BsonException.txt" size="3553" author="jcheng@medassets.com" created="Mon, 27 Apr 2015 15:10:10 +0000"/>
                            <attachment id="72009" name="QueryMongo.txt" size="573" author="jcheng@medassets.com" created="Mon, 27 Apr 2015 15:10:10 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs8suv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>