[ 
https://issues.apache.org/jira/browse/OLINGO-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chandan V.A resolved OLINGO-240.
--------------------------------
    Resolution: Won't Fix

This issue is specific to hibernate and currently there is no specific handling 
in Olingo JPA processor for hibernate. hence closing this ticket.

> 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
>    Affects Versions: V2 1.2.0
>            Reporter: Selvaratnam Ruckman Colins
>            Assignee: Chandan V.A
>
> I apply the filter URI for search by datetime as mentioned below,
> /StockMarketData.svc/Tests?$filter=TradingDate eq 
> datetime'2009-12-26T21:23:38'
> But it 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 at the error message 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+MySql to export my JPA model and i used following 
> annotation to map the date
> @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.3.4#6332)

Reply via email to