ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4548) Invalid mapping of enum to varchar on load/store operation.
Date Tue, 17 Jan 2017 12:10:26 GMT

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

Alexey Kuznetsov commented on IGNITE-4548:
------------------------------------------

Looks good for me. [~vkulichenko] could you also take a look?

> Invalid mapping of enum to varchar on load/store operation.
> -----------------------------------------------------------
>
>                 Key: IGNITE-4548
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4548
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 1.9
>            Reporter: Vasiliy Sisko
>            Assignee: Alexey Kuznetsov
>             Fix For: 1.9
>
>
> http://stackoverflow.com/questions/41609207/ignite-cachejdbcpojostorefactory-using-enum-fields
> On load of data when type contain enum field that mapped in varchar in database sometimes
kind of type is incorrectly detected as binary. 
> Pojo contain string transformer methods.
> {code}
> private OrderSide side; // OrderSide is an enum
> public String getSideAsString() {
>     return this.side.name();
> }
> public void setSideAsString(String s) {
>     this.side = OrderSide.valueOf(s);
> }
> {code}
> and enum column described as:
> {code}
> new JdbcTypeField(Types.VARCHAR, "side", String.class, "sideAsString")
> {code}



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

Mime
View raw message