karishma-tirthani / odata4j

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

$select=* not supported #163

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run InMemoryProducerSample
2. call http://localhost:8887/InMemoryProducerExample.svc/Threads?$select=*
3.

What is the expected output? What do you see instead?

Same output as http://localhost:8887/InMemoryProducerExample.svc/Threads

What version of the product are you using? On what operating system?
Using version 0.6, on Mac OS X 10.7

Please provide any additional information below.

Original issue reported on code.google.com by gbo...@gmail.com on 24 Apr 2012 at 9:14

GoogleCodeExporter commented 8 years ago
I am also getting this error on v0.7.  

URL:  http://localhost:8080/projects?$select=*
Stack trace:

java.lang.RuntimeException: Unable to tokenize: * current: 0 rem: *
    org.odata4j.expression.ExpressionParser.tokenize(ExpressionParser.java:800)
    org.odata4j.expression.ExpressionParser.parseExpand(ExpressionParser.java:104)
    org.odata4j.producer.resources.OptionsQueryParser.parseSelect(OptionsQueryParser.java:80)
    ...

The token * is not handled in ExpressionParser.tokenize(String), therefore it 
falls through to the RuntimeException throw.  There is also then obviously no 
handling of this token in readExpression(..) either, and there is no provision 
for a wildcard EntitySimpleProperty (assuming that's how * would be 
implemented).

We need this feature supported, so I'll ask over in the groups to see if 
there's already movement on an implementation.  Otherwise I'll look at 
implementing it myself.

Original comment by m...@syple.com.au on 11 Mar 2013 at 5:55

GoogleCodeExporter commented 8 years ago
Fixed by Matt's revision 7d5e79cfc271

Original comment by john.spurlock on 11 May 2013 at 6:48