<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:12 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-926] LINQ queries don&apos;t work with fields/properties of type byte enum </title>
                <link>https://jira.mongodb.org/browse/CSHARP-926</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;To reproduce:&lt;/p&gt;

&lt;p&gt;enum Enum1:byte&lt;br/&gt;
{&lt;br/&gt;
  E1,&lt;br/&gt;
  E2&lt;br/&gt;
}&lt;br/&gt;
public class C&lt;br/&gt;
{&lt;br/&gt;
    public int _id;&lt;br/&gt;
    public Enum1 e;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;var query =&lt;br/&gt;
    from x in collection.AsQueryable&amp;lt;C&amp;gt;()&lt;br/&gt;
    where x.e == Enum1.E1&lt;br/&gt;
    select x;&lt;br/&gt;
which results in the following exception:&lt;br/&gt;
1&lt;br/&gt;
Unsupported where clause: ((Int32)x.e == 0)&lt;/p&gt;</description>
                <environment></environment>
        <key id="118941">CSHARP-926</key>
            <summary>LINQ queries don&apos;t work with fields/properties of type byte enum </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="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="zephuros">zephuros</reporter>
                        <labels>
                    </labels>
                <created>Sat, 8 Mar 2014 07:24:23 +0000</created>
                <updated>Wed, 22 Apr 2015 16:34:12 +0000</updated>
                            <resolved>Wed, 22 Apr 2015 16:34:12 +0000</resolved>
                                    <version>1.9</version>
                                    <fixVersion>2.1</fixVersion>
                                    <component>Linq</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="895116" author="craiggwilson" created="Wed, 22 Apr 2015 16:34:12 +0000"  >&lt;p&gt;This has been fixed with &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-601&quot; title=&quot;Linq to Aggregation Framework&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-601&quot;&gt;&lt;del&gt;CSHARP-601&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="520644" author="ludmila shako" created="Fri, 21 Mar 2014 11:41:16 +0000"  >&lt;p&gt;I&apos;ve added a pull request here with a unit test: &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/pull/179&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/pull/179&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="517259" author="zephuros" created="Mon, 17 Mar 2014 08:20:55 +0000"  >&lt;p&gt;I deleted the comment before after test carefully ,&lt;br/&gt;
When using 1.9.0-rc0, it still throw exception &quot;Unsupported where clause: ((Int32)x.e == 0)&quot;.&lt;br/&gt;
But it worked when use a inner object like:&lt;br/&gt;
class B &lt;/p&gt;
{C c;}
&lt;p&gt;collection.AsQueryable&amp;lt;B&amp;gt;().Where(b =&amp;gt; b.c.e == Enum1.E1).ToList()&lt;/p&gt;</comment>
                            <comment id="513035" author="craiggwilson" created="Tue, 11 Mar 2014 00:49:14 +0000"  >&lt;p&gt;Hi zephuros, thanks for the report.&lt;/p&gt;

&lt;p&gt;I noticed you put Affects Version 1.9.  Are you using 1.9.0-rc0 and came across this, or did you mean a different version?  I only ask because I believe this would have been fixed with &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-613&quot; title=&quot;LINQ queries don&amp;#39;t work with fields/properties of type short (Int16)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-613&quot;&gt;&lt;del&gt;CSHARP-613&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-900&quot; title=&quot;Support downcasting object in LINQ queries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-900&quot;&gt;&lt;del&gt;CSHARP-900&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&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-935</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrwik7:</customfieldvalue>

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