<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:40:25 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-1701] how we can use $where from c# driver</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1701</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;When using syntax&lt;/p&gt;

&lt;p&gt;  var result = _collection.AsQueryable().Where(x =&amp;gt; x.FSTicker == x.Sedol).ToList();&lt;/p&gt;

&lt;p&gt;I&apos;m getting exception:&lt;/p&gt;

&lt;p&gt;Result Message:	System.ArgumentException : Unsupported filter: (&lt;/p&gt;
{document}{fstick} == {document}
{sedol}).&lt;br/&gt;
&lt;br/&gt;
Is there a way to us $where from c# code?&lt;br/&gt;
Now I&apos;m using aggregation as a workaround.&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
full stack trace:&lt;br/&gt;
&lt;br/&gt;
Test Name:	Comparison&lt;br/&gt;
Test FullName:	SoQuestionsSolver.CompareOnSameDocumentFieldsFeature.Comparison&lt;br/&gt;
Test Source:	C:\Users\gbernas\Source\Repos\profesor79\SoQuestionsSolver\SoQuestionsSolver\CompareOnSameDocumentFields.feature : line 5&lt;br/&gt;
Test Outcome:	Failed&lt;br/&gt;
Test Duration:	0:00:00.497&lt;br/&gt;
&lt;br/&gt;
Result StackTrace:	&lt;br/&gt;
at MongoDB.Driver.Linq.Translators.PredicateTranslator.Translate(Expression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Translators.PredicateTranslator.Translate(Expression node, IBsonSerializerRegistry serializerRegistry)&lt;br/&gt;
   at MongoDB.Driver.Linq.Translators.QueryableTranslator.TranslateWhere(WhereExpression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Translators.QueryableTranslator.Translate(Expression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Translators.QueryableTranslator.TranslatePipeline(PipelineExpression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Translators.QueryableTranslator.Translate(Expression node)&lt;br/&gt;
   at MongoDB.Driver.Linq.Translators.QueryableTranslator.Translate(Expression node, IBsonSerializerRegistry serializerRegistry)&lt;br/&gt;
   at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Translate(Expression expression)&lt;br/&gt;
   at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.GetExecutionModel(Expression expression)&lt;br/&gt;
   at MongoDB.Driver.Linq.MongoQueryableImpl`2.ToCursor(CancellationToken cancellationToken)&lt;br/&gt;
   at MongoDB.Driver.IAsyncCursorSourceExtensions.ToList&lt;span class=&quot;error&quot;&gt;&amp;#91;TDocument&amp;#93;&lt;/span&gt;(IAsyncCursorSource`1 source, CancellationToken cancellationToken)&lt;br/&gt;
   at SoQuestionsSolver.CompareOnSameDocumentFieldsSteps.ThenTryToUseWhereClause() in C:\Users\gbernas\Source\Repos\profesor79\SoQuestionsSolver\SoQuestionsSolver\CompareOnSameDocumentFieldsSteps.cs:line 46&lt;br/&gt;
   at lambda_method(Closure , IContextManager )&lt;br/&gt;
   at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan&amp;amp; duration)&lt;br/&gt;
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)&lt;br/&gt;
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance)&lt;br/&gt;
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()&lt;br/&gt;
   at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()&lt;br/&gt;
   at SoQuestionsSolver.CompareOnSameDocumentFieldsFeature.ScenarioCleanup()&lt;br/&gt;
   at SoQuestionsSolver.CompareOnSameDocumentFieldsFeature.Comparison() in C:\Users\gbernas\Source\Repos\profesor79\SoQuestionsSolver\SoQuestionsSolver\CompareOnSameDocumentFields.feature:line 8&lt;br/&gt;
Result Message:	System.ArgumentException : Unsupported filter: ({document}{fstick} == {document}{sedol}
&lt;p&gt;).&lt;/p&gt;


</description>
                <environment>generic</environment>
        <key id="299931">CSHARP-1701</key>
            <summary>how we can use $where from c# driver</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="profesor79">Greg</reporter>
                        <labels>
                    </labels>
                <created>Mon, 11 Jul 2016 09:26:48 +0000</created>
                <updated>Mon, 11 Jul 2016 13:39:43 +0000</updated>
                            <resolved>Mon, 11 Jul 2016 13:37:14 +0000</resolved>
                                                                    <component>API</component>
                    <component>Linq</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1319856" author="profesor79" created="Mon, 11 Jul 2016 13:39:43 +0000"  >&lt;p&gt;Thanks Craig!&lt;/p&gt;</comment>
                            <comment id="1319853" author="craiggwilson" created="Mon, 11 Jul 2016 13:37:06 +0000"  >&lt;p&gt;I&apos;ve linked a duplicate request. &lt;/p&gt;

&lt;p&gt;Note that this isn&apos;t supported because MongoDB&apos;s query language doesn&apos;t support field-to-field comparisons. Regardless, I&apos;d highly suggest not using $where. It requires falling back to javascript, which is slow. Your &quot;workaround&quot; using aggregation is a much better way to go.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="234583">CSHARP-1445</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsnd9z:</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>