chandransalem / odata4j

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

$skiptoken is not working with $orderby although it is recommended by odata, which makes sense, but it's working without $orderby. #138

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using JPAProducer, Northwind db, Jboss, SQL Server 
2. URI is /Products?$orderby=ProductID&$skiptoken=10

What is the expected output? What do you see instead?
1. It should list the products with ProductID > 10 sorted by PoductID

What version of the product are you using? On what operating system?
odata4j 0.5

Please provide any additional information below.
Exception stack trace is here.

java.lang.StringIndexOutOfBoundsException: String index out of range: 
-1
    java.lang.String.substring(String.java:1958)
    org.odata4j.producer.jpa.JPASkipToken.parse(JPASkipToken.java:64)

Original issue reported on code.google.com by mr.b...@gmail.com on 16 Feb 2012 at 8:32

GoogleCodeExporter commented 8 years ago
and in the case of composite primary key

URI= 
/Order_Details?$orderby=OrderID,ProductID&$skiptoken=OrderID=10248,ProductID=72

Error: 

java.lang.RuntimeException: Unable to read expression with tokens: [[OrderID], 
[=], [10248]]
    org.odata4j.expression.ExpressionParser.readExpression(ExpressionParser.java:730)
    org.odata4j.expression.ExpressionParser.parse(ExpressionParser.java:64)
    org.odata4j.expression.Expression.parse(Expression.java:20)

Original comment by mr.b...@gmail.com on 16 Feb 2012 at 9:22

GoogleCodeExporter commented 8 years ago
I am facing the same issue. Any chance it would get fixed soon.

Original comment by kamran...@gmail.com on 16 May 2012 at 12:56

GoogleCodeExporter commented 8 years ago
Can you send a patch?

Original comment by john.spurlock on 21 May 2012 at 12:49