Selvaratnam Ruckman Colins created OLINGO-240:
-------------------------------------------------

             Summary: Filter by datetime is not working
                 Key: OLINGO-240
                 URL: https://issues.apache.org/jira/browse/OLINGO-240
             Project: Olingo
          Issue Type: Bug
          Components: odata2-jpa, odata4-server
    Affects Versions: V2 1.2.0
            Reporter: Selvaratnam Ruckman Colins
            Priority: Blocker


I apply the filter URI for search by datetime as mentioned 
/StockMarketData.svc/Tests?$filter=TradingDate eq datetime'2009-12-26T21:23:38'

But i gives me following an error 
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";>
<code/>
<message xml:lang="en">
"OData - JPA Runtime: JPA query syntax is not correct"
</message>
</error>

Also i got more information after download the source code and debug 
through,Please take took below

org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException: 
"OData - JPA Runtime: JPA query syntax is not correct"

java.lang.IllegalArgumentException: org.hibernate.QueryException: unexpected 
char: '{' [SELECT E1 FROM au.com.righttime.unity.odata.service.model.Test E1 
WHERE E1.tradingDate = {ts '2009-12-26 21:23:38.000'}]
Error occurred at ODataRequestHandler.handle 
odataResponse =
          dispatcher.dispatch(method, uriInfo, request.getBody(), 
request.getContentType(), acceptContentType
              .toContentTypeString());


I used JPA+HIbernate qith following annotation

@Temporal(TemporalType.TIMESTAMP)
 private Calendar passwordCreatedDate;

I tried all scenarios like Date...but does not work at all.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to