[ 
https://issues.apache.org/jira/browse/OLINGO-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14254500#comment-14254500
 ] 

Chandan V.A commented on OLINGO-525:
------------------------------------

Hello Aleh,
Are you using eclipselink as JPA Provider, in that case please refer to the bug 
filed here - https://bugs.eclipse.org/bugs/show_bug.cgi?id=412262. There is a 
bug in Metamodel APIs of Eclipselink that provides wrong data type for all 
Temporal Types when used in Embeddable Types.

As a workaround till the issue is fixed from Eclipselink (this requires voting 
on the eclipselink bug), you could add a setter Method that takes 
java.sql.Timestamp as input parameter and then convert this value to Calendar 
type. Similarly you could also add a getter method that return 
java.sql.Timestamp by converting the Calendar type.

I would like to close this issue with reference to 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=412262 stating that the use case 
will work correctly once the bug in eclipselink is fixed.

Regards
Chandan

> Issue with Post operation for the entity with embedded class that contains  
> timeStamp (TemporalType.TIMESTAMP)
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: OLINGO-525
>                 URL: https://issues.apache.org/jira/browse/OLINGO-525
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>            Reporter: Aleh Autushka
>            Assignee: Chandan V.A
>
> Hello,
> Getting 500 error when try to create an entity that contains an embedded 
> class with a timeStamp:
> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";>
> <code />
> <message xml:lang="en">"OData - JPA Runtime: JPA create request is not 
> correct"</message>
> <innererror>class 
> org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException 
> : "org.apache.olingo.odata2.jpa.processor.core.access.data.JPAEntityParser: 
> com.projectx.dal.model.GeneralAttributes.setTimeStamp(java.sql.Timestamp). 
> "</innererror>
>  </error>
> In my case embedded class is GeneralAttributes and it contains an attribute 
> TimeStamp of type TemporalType.TIMESTAMP. If I remove timestamp attribute or 
> move it to higher level everything works fine.
> Br, Aleh



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to