[
https://issues.apache.org/jira/browse/IGNITE-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15824167#comment-15824167
]
ASF GitHub Bot commented on IGNITE-4548:
----------------------------------------
GitHub user vsisko opened a pull request:
https://github.com/apache/ignite/pull/1433
IGNITE-4548 Implemented mapping of enum fields for POJO STORE
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gridgain/apache-ignite ignite-4548-2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/1433.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1433
----
commit ab956f2d970507d8c7fe414c10ceda061bf99ba8
Author: vsisko <[email protected]>
Date: 2017-01-16T11:11:30Z
IGNITE-4548 Mapping of enum types.
commit e4e3ce4c388abaf9595964a33544fc255347abb1
Author: vsisko <[email protected]>
Date: 2017-01-16T12:10:22Z
IGNITE-4548 Mapping of enum types test.
----
> 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: Vasiliy Sisko
> 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)