<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:27 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-1016] LINQ driver does not support nested paging (i.e. take/skip).</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1016</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I am hosting a RESTful Web API service using OData v4.  When attempting to perform the following query:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://127.0.0.1:444/QA/main/Graphs/Items?$expand=Attributes&amp;amp;$skip=672&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://127.0.0.1:444/QA/main/Graphs/Items?$expand=Attributes&amp;amp;$skip=672&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we see the following error:&lt;/p&gt;

&lt;p&gt;&quot;Skip and Take may only be used in conjunction with each other and cannot be separated by other operations.&quot;&lt;/p&gt;

&lt;p&gt;The previously specified OData query results in paging on both the entity set for &apos;Items&apos; and the contained entity set &apos;Attributes&apos; because we have a page size set of 672 also, which results in a take being applied to the expression over the Attributes entity set.&lt;/p&gt;

&lt;p&gt;For example, here is the expression that fails:&lt;/p&gt;

&lt;p&gt;+		_expression	{value(MongoDB.Driver.Linq.MongoQueryable`1&lt;span class=&quot;error&quot;&gt;&amp;#91;SE.OIP.DFL.Domain.Entities.Graphs.Item&amp;#93;&lt;/span&gt;).Where(o =&amp;gt; ((o.Tenant == value(SE.OIP.DFL.Data.Repository.Mongo.Graphs.ItemsMongoRepository).tenant) AndAlso (o.Storage == value(SE.OIP.DFL.Data.Repository.Mongo.Graphs.ItemsMongoRepository).storage))).OfType().OrderBy($it =&amp;gt; $it.InstanceId).Skip(value(System.Web.OData.Query.Expressions.LinqParameterContainer+TypedLinqParameterContainer`1&lt;span class=&quot;error&quot;&gt;&amp;#91;System.Int32&amp;#93;&lt;/span&gt;).TypedProperty).Select(Param_0 =&amp;gt; new SelectAllAndExpand`1() {ModelID = &quot;1ca23847-7ec1-49d4-898f-49e8dfe03a24&quot;, Instance = Param_0, Container = new CollectionExpandedProperty`1() {Name = &quot;Attributes&quot;, Collection = Param_0.Attributes.Take(value(System.Web.OData.Query.Expressions.LinqParameterContainer+TypedLinqParameterContainer`1&lt;span class=&quot;error&quot;&gt;&amp;#91;System.Int32&amp;#93;&lt;/span&gt;).TypedProperty).Select(Param_1 =&amp;gt; new SelectAll`1() &lt;/p&gt;
{ModelID = &quot;1ca23847-7ec1-49d4-898f-49e8dfe03a24&quot;, Instance = Param_1}
&lt;p&gt;), PageSize = 672}})}	System.Linq.Expressions.Expression &lt;/p&gt;
{System.Linq.Expressions.MethodCallExpressionN}

&lt;p&gt;This fails when it attempts to translate &apos;take&apos; and the previous expression is &apos;select&apos;, resulting in the exception.&lt;/p&gt;</description>
                <environment>.NET 4.5, VS2012, Win7, Azure, OData v4, Web API</environment>
        <key id="147253">CSHARP-1016</key>
            <summary>LINQ driver does not support nested paging (i.e. take/skip).</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="9">Done</resolution>
                                        <assignee username="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="bothead">bothead</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Jul 2014 15:40:46 +0000</created>
                <updated>Wed, 13 Apr 2016 21:04:23 +0000</updated>
                            <resolved>Fri, 24 Apr 2015 02:20:51 +0000</resolved>
                                    <version>1.9.1</version>
                                    <fixVersion>2.1</fixVersion>
                                    <component>Linq</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="896909" author="craiggwilson" created="Fri, 24 Apr 2015 02:20:51 +0000"  >&lt;p&gt;This was 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>
                    </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|hs0tiv:</customfieldvalue>

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