<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:23 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-994] OData $expand and $top query options together with PageSize throws a MongoDB.Driver.MongoQueryException</title>
                <link>https://jira.mongodb.org/browse/CSHARP-994</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I have a OData controller with Get action which has a QueryableAttribute with set PageSize property:&lt;/p&gt;

&lt;p&gt;        &lt;span class=&quot;error&quot;&gt;&amp;#91;Queryable(PageSize=5000)&amp;#93;&lt;/span&gt;&lt;br/&gt;
        public async Task&amp;lt;IHttpActionResult&amp;gt; Get(&lt;span class=&quot;error&quot;&gt;&amp;#91;FromODataUri&amp;#93;&lt;/span&gt; Guid key)&lt;/p&gt;
        {
              return this.Ok(repository.All());
        }

&lt;p&gt;repository.All() - returns MongoQueryable&lt;/p&gt;

&lt;p&gt;when I make a GET request to my OData controller with following query:&lt;br/&gt;
 ?$expand=Attributes&amp;amp;$top=10&lt;/p&gt;

&lt;p&gt;I get MongoDB.Driver.MongoQueryException exception with message:&lt;br/&gt;
Skip and Take may only be used in conjunction with each other and cannot be separated by other operations.&lt;/p&gt;

&lt;p&gt;If I remove $top or $expand option from my request or remove PegeSize from QueryableAttribute then I get successful response&lt;/p&gt;




</description>
                <environment>.NET 4.5</environment>
        <key id="141628">CSHARP-994</key>
            <summary>OData $expand and $top query options together with PageSize throws a MongoDB.Driver.MongoQueryException</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="dimitar.moev@schneider-electric.com">Dimitar Moev</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Jun 2014 20:00:41 +0000</created>
                <updated>Wed, 8 Feb 2023 13:59:21 +0000</updated>
                            <resolved>Mon, 4 May 2015 17:20:08 +0000</resolved>
                                    <version>1.9.1</version>
                                    <fixVersion>2.1</fixVersion>
                                    <component>Linq</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="905207" author="dimitar.moev@schneider-electric.com" created="Tue, 5 May 2015 12:56:27 +0000"  >&lt;p&gt;I am using $expand to load and array of sub-documents. For example the &lt;br/&gt;
main documents is a TimeSeries which has Attribute property which is an &lt;br/&gt;
array.&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;Attributes&quot; : [ &lt;/p&gt;
        {
            &quot;Name&quot; : &quot;EntryExpiration&quot;,
            &quot;SemanticRef&quot; : &quot;DateTime&quot;,
            &quot;Value&quot; : &quot;9.00:00:00.000&quot;
        }
&lt;p&gt;    ],&lt;br/&gt;
    &quot;IsCumulative&quot; : false,&lt;br/&gt;
    &quot;MeasureType&quot; : 2,&lt;br/&gt;
    &quot;Name&quot; : &quot;NumericSeries1&quot;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Sometimes the number of attributes could be very large, so I want to load &lt;br/&gt;
TimeSeries with (1) or without (2)  the Attributes:&lt;/p&gt;

&lt;p&gt;1. &lt;a href=&quot;http://localhost/TimeSeries?$expand=Attributes&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost/TimeSeries?$expand=Attributes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. &lt;a href=&quot;http://localhost/TimeSeries&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost/TimeSeries&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Dimitar&lt;/p&gt;




&lt;p&gt;From:&lt;br/&gt;
&quot;Craig Wilson (JIRA)&quot; &amp;lt;jira@mongodb.org&amp;gt;&lt;br/&gt;
To:&lt;br/&gt;
dimitar.moev@schneider-electric.com, &lt;br/&gt;
Date:&lt;br/&gt;
05/04/2015 01:20 PM&lt;br/&gt;
Subject:&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB-JIRA&amp;#93;&lt;/span&gt; (&lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-994&quot; title=&quot;OData $expand and $top query options together with PageSize throws a MongoDB.Driver.MongoQueryException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-994&quot;&gt;&lt;del&gt;CSHARP-994&lt;/del&gt;&lt;/a&gt;) OData $expand and $top query options together &lt;br/&gt;
with PageSize throws a MongoDB.Driver.MongoQueryException&lt;/p&gt;




&lt;p&gt;     [ &lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/CSHARP-994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt; &lt;br/&gt;
]&lt;/p&gt;

&lt;p&gt;Craig Wilson closed &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-994&quot; title=&quot;OData $expand and $top query options together with PageSize throws a MongoDB.Driver.MongoQueryException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-994&quot;&gt;&lt;del&gt;CSHARP-994&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
-------------------------------&lt;br/&gt;
    Resolution: Fixed&lt;/p&gt;

&lt;p&gt;This is fixed by &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;

&lt;p&gt;However, I notice the $expand in your url and, since MongoDB doesn&apos;t &lt;br/&gt;
support relationships between collections, I&apos;m not sure how that is &lt;br/&gt;
getting used.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;

&lt;p&gt;MongoDB.Driver.MongoQueryException&lt;br/&gt;
-------------------------------------------------------------------------------------------------------&lt;br/&gt;
with set PageSize property:&lt;br/&gt;
key)&lt;br/&gt;
be separated by other operations.&lt;br/&gt;
from QueryableAttribute then I get successful response&lt;/p&gt;

&lt;p&gt;----------------------&lt;br/&gt;
This message was sent from MongoDB&apos;s issue tracking system. To respond to &lt;br/&gt;
this ticket, please login to &lt;a href=&quot;https://jira.mongodb.org&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org&lt;/a&gt; using your JIRA or &lt;br/&gt;
MMS credentials.&lt;/p&gt;

&lt;p&gt;______________________________________________________________________&lt;br/&gt;
This email has been scanned by the Symantec Email Security.cloud service.&lt;br/&gt;
______________________________________________________________________&lt;/p&gt;

</comment>
                            <comment id="904390" author="craiggwilson" created="Mon, 4 May 2015 17:20:08 +0000"  >&lt;p&gt;This is fixed by &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;

&lt;p&gt;However, I notice the $expand in your url and, since MongoDB doesn&apos;t support relationships between collections, I&apos;m not sure how that is getting used.&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="52910">CSHARP-601</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_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|hs7utr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>103723</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="506">C# Sprint 19</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>