<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:40:30 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-1725] Member type is superclass and value type is subclass, IQueryable toarray serialize failed</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1725</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I have a object to be serialized, in the CLR class, I defined the member as type like PropertyContainer, then for the instacen, its value is set to type like NamedProperty which is subclass of propertyContainer, and when I called queryable toArray method, driver failed to serialize the content as it find the two type are mismatched,&lt;/p&gt;

&lt;p&gt;&#8226; message:&#160;&quot;Value type of serializer is System.Web.OData.Query.Expressions.PropertyContainer+NamedProperty`1[&lt;span class=&quot;error&quot;&gt;&amp;#91;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;#93;&lt;/span&gt;] and does not match member type System.Web.OData.Query.Expressions.PropertyContainer. Parameter name: serializer&quot;,&lt;br/&gt;
&#8226; type:&#160;&quot;System.ArgumentException&quot;,&lt;br/&gt;
&#8226; stacktrace:&#160;&quot;&lt;br/&gt;
at MongoDB.Bson.Serialization.BsonMemberMap.SetSerializer(IBsonSerializer serializer) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Bson\Serialization\BsonMemberMap.cs:line 477 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.BuildClassMap(Type type, ProjectionMapping mapping) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 167 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.BuildProjectedSerializer(ProjectionMapping mapping) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 123 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.BuildMemberInit(MemberInitExpression node) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 106 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.Build(Expression node) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 52 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.BuildClassMap(Type type, ProjectionMapping mapping) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 160 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.BuildClassMap(Type type, ProjectionMapping mapping) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 148 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.BuildClassMap(Type type, ProjectionMapping mapping) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 148 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.BuildProjectedSerializer(ProjectionMapping mapping) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 123 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.BuildMemberInit(MemberInitExpression node) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 106 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.Build(Expression node) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 52 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.SerializerBuilder.Build(Expression node, IBsonSerializerRegistry serializerRegistry) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\SerializerBuilder.cs:line 31 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.PipelineBindingContext.GetSerializer(Type type, Expression node) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\Pipeline\PipelineBindingContext.cs:line 90 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.PipelineBindingContext.BindProjector(Expression&amp;amp; selector) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\Pipeline\PipelineBindingContext.cs:line 98 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.Pipeline.MethodCallBinders.SelectBinder.Bind(PipelineExpression pipeline, PipelineBindingContext bindingContext, MethodCallExpression node, IEnumerable`1 arguments) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\Pipeline\MethodCallBinders\SelectBinder.cs:line 45 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.MethodInfoMethodCallBinder`1.Bind(PipelineExpression pipeline, TBindingContext bindingContext, MethodCallExpression node, IEnumerable`1 arguments) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\MethodInfoMethodCallBinder.cs:line 41 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.PipelineBinderBase`1.BindMethodCall(MethodCallExpression node) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\PipelineBinderBase.cs:line 97 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.PipelineBinderBase`1.Bind(Expression node) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\PipelineBinderBase.cs:line 58 &lt;br/&gt;
at MongoDB.Driver.Linq.Processors.Pipeline.PipelineBinder.Bind(Expression node, IBsonSerializerRegistry serializerRegistry) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\Processors\Pipeline\PipelineBinder.cs:line 62 &lt;br/&gt;
at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Prepare(Expression expression) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\MongoQueryProviderImpl.cs:line 122 &lt;br/&gt;
at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Translate(Expression expression) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\MongoQueryProviderImpl.cs:line 129 &lt;br/&gt;
at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Execute(Expression expression) in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\MongoQueryProviderImpl.cs:line 77 &lt;br/&gt;
at MongoDB.Driver.Linq.MongoQueryableImpl`2.GetEnumerator() in D:\dev\githome\external\mongo-csharp-driver\src\MongoDB.Driver\Linq\MongoQueryableImpl.cs:line 60 at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray&lt;span class=&quot;error&quot;&gt;&amp;#91;TSource&amp;#93;&lt;/span&gt;(IEnumerable`1 source)&lt;/p&gt;</description>
                <environment>Windows 10</environment>
        <key id="303964">CSHARP-1725</key>
            <summary>Member type is superclass and value type is subclass, IQueryable toarray serialize failed</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="5">Cannot Reproduce</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="chinadragon0515">chinadragon0515</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Jul 2016 02:36:28 +0000</created>
                <updated>Thu, 3 Feb 2022 01:16:37 +0000</updated>
                            <resolved>Thu, 3 Feb 2022 01:16:37 +0000</resolved>
                                    <version>2.2.4</version>
                                                    <component>Linq</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="4332279" author="james.kovacs" created="Thu, 3 Feb 2022 01:16:37 +0000"  >&lt;p&gt;Unfortunately there is insufficient details to reproduce this issue. Given how long ago this ticket was filed, it is unlikely that we will get a repro. Please file a new CSHARP ticket if you run into a similar issue in the future.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CSHARP-3615</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr498v:</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>