kink80 / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

How to use orderBy() to sort the content using the date format? #259

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Could you please provide with an sample where we can use the orderBy() on date 
format to sort out the content based on the latest published date.
And also the <updated> tag is of an system property, which we are unable to 
fetch.

Here is the complete explaination of the issue :-

In our service layer, we are getting this <updated> property tag which is of 
date format, used for published date & time, and this element/tag is 
getting/fetched as an system property, in sense it is being shown not in the 
<content> tag.

<updated>2013-05-29T02:24:07-04:00</updated> 

Below is the List where we are trying to fetch the content/records :

List<OEntity> componentPresentations = consumer.getEntities(
        "ComponentPresentations").filter(
        "ComponentId eq  " + "'" + CPID + "'").orderBy("updated").top(i).execute().toList();

Original issue reported on code.google.com by thabrez....@gmail.com on 29 May 2013 at 6:32

GoogleCodeExporter commented 8 years ago
Could please provide us an example to use the orderBy() with an date example 
after the filter option, and also it will helpful for us, if we could let us 
know on how to use the System Property that are being generated from the CMS to 
odata service layer.

Original comment by thabrez....@gmail.com on 29 May 2013 at 2:25