<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: odata v2 sorting not working (Java v1 backend service) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-v2-sorting-not-working-java-v1-backend-service/m-p/12470561#M2000934</link>
    <description>&lt;P&gt;Subhajit provided the corect answer in his comment. Thanks very much!&lt;/P&gt;&lt;P&gt;Not sure how many times I checked the code but couldn't see it...&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 15:43:54 GMT</pubDate>
    <dc:creator>WFlats</dc:creator>
    <dc:date>2021-07-15T15:43:54Z</dc:date>
    <item>
      <title>odata v2 sorting not working (Java v1 backend service)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-v2-sorting-not-working-java-v1-backend-service/m-p/12470559#M2000932</link>
      <description>&lt;P&gt;I want to find the earliest start of a task entity at a certain location with an odata v2 read operation.&lt;BR /&gt;This is the code&lt;/P&gt;
  &lt;P&gt;oModel.read("/Tasks", { &lt;BR /&gt;filters: [new Filter("location_ID", FilterOperator.EQ, sLocationID)], &lt;BR /&gt;sorter: [new Sorter("actualStart", false)],&lt;BR /&gt;urlParameters: {&lt;BR /&gt;$top: 100 // revisit &lt;BR /&gt;},&lt;BR /&gt;success: function (oData) {...&lt;/P&gt;
  &lt;P&gt;I usually only have to use "$top: 1" as this first entity contains the earliest task.&lt;/P&gt;
  &lt;P&gt;But I realised that the data is not sorted.&lt;/P&gt;
  &lt;P&gt;When I look at the HTTP request then the payload doesn't contain any "orderBy" statement.&lt;/P&gt;
  &lt;P&gt;SAP support told me to ask a question here as it is custom code.&lt;/P&gt;
  &lt;P&gt;Can anyone see an error in my code? I used such read operations with a sorter many times and can't see a mistake.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 08:25:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-v2-sorting-not-working-java-v1-backend-service/m-p/12470559#M2000932</guid>
      <dc:creator>WFlats</dc:creator>
      <dc:date>2021-07-15T08:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: odata v2 sorting not working (Java v1 backend service)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-v2-sorting-not-working-java-v1-backend-service/m-p/12470560#M2000933</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Replace the parameter name with ‘sorters’ instead of ‘sorter’..&lt;/P&gt;&lt;P&gt;Also make sure your alias points to the correct class..&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 15:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-v2-sorting-not-working-java-v1-backend-service/m-p/12470560#M2000933</guid>
      <dc:creator>subhajit</dc:creator>
      <dc:date>2021-07-15T15:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: odata v2 sorting not working (Java v1 backend service)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-v2-sorting-not-working-java-v1-backend-service/m-p/12470561#M2000934</link>
      <description>&lt;P&gt;Subhajit provided the corect answer in his comment. Thanks very much!&lt;/P&gt;&lt;P&gt;Not sure how many times I checked the code but couldn't see it...&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 15:43:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-v2-sorting-not-working-java-v1-backend-service/m-p/12470561#M2000934</guid>
      <dc:creator>WFlats</dc:creator>
      <dc:date>2021-07-15T15:43:54Z</dc:date>
    </item>
  </channel>
</rss>

