<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:09 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-1280] Deserializing fails if a document contains unmapped field which name starts with the same name as currently mapped class property.</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1280</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Consider a situation when you have a class with a property named &quot;Abc&quot;. You stored an object of this class in Mongo. Later you decide to rename the property to &quot;Abcd&quot; (notice that the new property name starts with the same letters as the old one). Now if you try to deserialize the previously saved document (which contains the old key called &quot;Abc&quot;), the deserialization fails inside the BsonStreamExtensions.ReadBsonType method. This happens even if SetIgnoreExtraElements is set to true. &lt;/p&gt;

&lt;p&gt;There are two different exceptions thrown inside the BsonStreamExtensions.ReadBsonType method depending whether the new (&quot;Abcd&quot;) key is stored in the document or not. If it is stored, the method will fail with FormatException (&quot;Invalid BsonType&quot;). It it&apos;s not stored, then it fails with System.IO.EndOfStreamException.&lt;/p&gt;

&lt;p&gt;I&apos;m attaching a sample solution with instructions how to reproduce the bug in comments.&lt;/p&gt;</description>
                <environment>Windows</environment>
        <key id="204235">CSHARP-1280</key>
            <summary>Deserializing fails if a document contains unmapped field which name starts with the same name as currently mapped class property.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="yuriylsh">Yuriy</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 May 2015 16:42:54 +0000</created>
                <updated>Thu, 14 May 2015 17:31:06 +0000</updated>
                            <resolved>Thu, 14 May 2015 17:08:35 +0000</resolved>
                                    <version>2.0</version>
                                    <fixVersion>2.0.1</fixVersion>
                                    <component>Serialization</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="914269" author="yuriylsh" created="Thu, 14 May 2015 17:10:21 +0000"  >&lt;p&gt;Thank you for the quick resolution! &lt;br/&gt;
Hopefully 2.0.x is coming out soon...&lt;/p&gt;</comment>
                            <comment id="914266" author="rstam" created="Thu, 14 May 2015 17:08:16 +0000"  >&lt;p&gt;Thanks for the helpful reproduction instructions. They made it easy to verify that this has already been fixed.&lt;/p&gt;</comment>
                            <comment id="914265" author="rstam" created="Thu, 14 May 2015 17:06:53 +0000"  >&lt;p&gt;I verified that this issue is resolved in both the master and the 2.0.x branches by the fix to &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1255&quot; title=&quot;An ignored BsonElement with a prefix of a known BsonElement&amp;#39;s causes an EndOfStreamException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1255&quot;&gt;&lt;del&gt;CSHARP-1255&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="914245" author="rstam" created="Thu, 14 May 2015 16:48:43 +0000"  >&lt;p&gt;This appears to be at least partially related to &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1255&quot; title=&quot;An ignored BsonElement with a prefix of a known BsonElement&amp;#39;s causes an EndOfStreamException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1255&quot;&gt;&lt;del&gt;CSHARP-1255&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="200369">CSHARP-1255</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="74348" name="MongoDriverBug.zip" size="4783" author="yuriylsh" created="Thu, 14 May 2015 16:42:54 +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|hs9csn:</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>