<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:35:39 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-42] StartsWith, Contains Linq expression bug</title>
                <link>https://jira.mongodb.org/browse/CSHARP-42</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;When creating a query like so:&lt;/p&gt;

&lt;p&gt;public class MongoContext&lt;br/&gt;
{&lt;br/&gt;
    public IQueryable&amp;lt;SomeObject&amp;gt; Objects&lt;br/&gt;
    {&lt;br/&gt;
        get &lt;/p&gt;
        {
            return collection.Linq();
        }
&lt;p&gt;    }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;and calling it with the following:&lt;/p&gt;

&lt;p&gt;var objectsThatStartWithA = mongoContext.Objects.Where(o =&amp;gt; o.Name.StartsWith(&quot;A&quot;));&lt;/p&gt;

&lt;p&gt;Or:&lt;/p&gt;

&lt;p&gt;var objectsThatStartWithA = mongoContext.Objects.Where(o =&amp;gt; o.Name.Contains(&quot;A&quot;));&lt;/p&gt;

&lt;p&gt;You get the correct instances from Mongo but all properties are set to null.&lt;/p&gt;

&lt;p&gt;I would guess the best way to implement these would be to use regular expressions although I wasn&apos;t able to get these working correctly:&lt;/p&gt;

&lt;p&gt;db.ObjectsDb.Find( &lt;/p&gt;
{ Name: /&quot;A&quot;*/  }
&lt;p&gt; )&lt;br/&gt;
And&lt;br/&gt;
db.ObjectsDb.Find( &lt;/p&gt;
{ Name: /*&quot;A&quot;*/ }
&lt;p&gt; )&lt;/p&gt;
</description>
                <environment>Windows, VS2010</environment>
        <key id="12169">CSHARP-42</key>
            <summary>StartsWith, Contains Linq expression bug</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="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="nisbus">nisbus</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Jun 2010 23:25:02 +0000</created>
                <updated>Wed, 19 Oct 2016 14:16:04 +0000</updated>
                            <resolved>Sat, 19 Jun 2010 20:51:41 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="14886" author="craiggwilson" created="Sat, 19 Jun 2010 20:51:41 +0000"  >&lt;p&gt;I have fixed the problem.  It related to how and when we added the discriminator to a document.  When going through linq, an empty field selection list was passed to the serializer.  Because it was a derived type, we added the discriminator to the list, which resulted in only the discriminator getting selected.  This has been corrected in the Linq provider.  Nothing else should have this problem.&lt;/p&gt;</comment>
                            <comment id="14881" author="nisbus" created="Sat, 19 Jun 2010 18:02:32 +0000"  >&lt;p&gt;Here is a sample console app that demonstrates the error.&lt;/p&gt;</comment>
                            <comment id="14880" author="nisbus" created="Sat, 19 Jun 2010 15:55:26 +0000"  >&lt;p&gt;That&apos;s correct.&lt;/p&gt;</comment>
                            <comment id="14878" author="craiggwilson" created="Sat, 19 Jun 2010 09:20:41 +0000"  >&lt;p&gt;These are implemented using regular expressions already.  What gets me wondering is about all the null properties. &lt;/p&gt;

&lt;p&gt;What I understand you saying is that when you use one of these functions, none of the properties of the returned object have any data in them.  Is this correct?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="10245" name="MongoExperiment.zip" size="441674" author="nisbus" created="Sat, 19 Jun 2010 18:02:32 +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|hrha1j:</customfieldvalue>

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