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

Rudy Gardelein commented on OLINGO-386:
---------------------------------------

Dear Chandan,

I am not exactly clear on your question.

Here is an example of the generated code for the JPA out of a MySQL table that 
contains a boolean switch called "active".  In the database this is a boolean 
aka bit(1).  The generated JPA java code mentions this as:         "private 
byte active;"    In order to make it work, I need to replace the "byte" 
annotation with "boolean" in the JPA java code and after that everything starts 
working.

Hope this clarifies the problem.

Best regards,

Gardelini

> Not all JPA data types handled correctly
> ----------------------------------------
>
>                 Key: OLINGO-386
>                 URL: https://issues.apache.org/jira/browse/OLINGO-386
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.0
>         Environment: Olingo ODATA V2 Producer JPA
>            Reporter: Rudy Gardelein
>            Assignee: Chandan V.A
>
> I have tested the ODATA V2 JPA producer again with V2 2.0.0 in view of the 
> resolution of issue reported with OLINGO-329.  I am still experiencing issues 
> with data types not being handled correctly from MySQL through JPA.   For 
> database connectivity I am using Eclipselink.
> The MySQL data type timestamp is now implemented correctly and is treated 
> correctly by the JPA and the Olingo V2 2.0.0.
> MySQL data type boolean ( bit(1) ) gets translated by the JPA to a byte[] 
> array, and the Olingo JPA library is not handling that data type correctly.
> MySQL data type datetime gets translated by the JPA to a date field, and the 
> Olingo JPA library is not handling that data type correctly.
> I managed to correct the code generated by the Eclipselink/Olingo to have the 
> producer work correctly, but would be better if the code as generated would 
> work from the start.
> Anything in sight that would resolve these issues?
> Many thanks,
> Gardelini



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

Reply via email to