[
https://issues.apache.org/jira/browse/OLINGO-293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14026182#comment-14026182
]
Michael Bolz commented on OLINGO-293:
-------------------------------------
Hi [~chandan.v.a], can you please take a look into this issue?
Kind regards,
Michael
> Unable to POST an entity with a DateTime type field using underlying JPA model
> ------------------------------------------------------------------------------
>
> Key: OLINGO-293
> URL: https://issues.apache.org/jira/browse/OLINGO-293
> Project: Olingo
> Issue Type: Bug
> Components: odata2-jpa
> Affects Versions: V2 1.2.0
> Environment: Tomcat 7.0.45
> Eclipselink 2.5.0
> Reporter: Riley Rainey
> Assignee: Chandan V.A
> Priority: Minor
>
> Attempting to supply a value for a DateTime field in a POST operation yields
> this error message:
> <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
> : "OData - JPA Runtime: Internal error [argument type mismatch]"</innererror>
> </error>
> I have tried to declare the underlying field a few ways:
> @Temporal(TemporalType.TIMESTAMP)
> protected Date lastUpdate;
> and
> @Temporal(TemporalType.TIMESTAMP)
> protected Calendar lastUpdate;
> The first configuration fails, bit the second (using java.util.Calendar)
> seems to work.
> In the failing case, I have tried POST-ing both as XML and JSON using the
> proper date format for each.
> I can work around this for my specific application, but I expect there will
> be others that might prefer or need to use Date.
--
This message was sent by Atlassian JIRA
(v6.2#6252)