[ 
https://issues.apache.org/jira/browse/IGNITE-17556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vyacheslav Koptilin updated IGNITE-17556:
-----------------------------------------
    Reviewer: Vyacheslav Koptilin

> Ignite doc: Wrong use of setValueFields function in CacheJdbcPojoStore demo
> ---------------------------------------------------------------------------
>
>                 Key: IGNITE-17556
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17556
>             Project: Ignite
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.13
>            Reporter: YuJue Li
>            Assignee: YuJue Li
>            Priority: Trivial
>             Fix For: 2.14
>
>         Attachments: 
> 0001-IGNITE-17556-Ignite-doc-Wrong-use-of-setValueFields-.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The following page of documentation provides an example of configuring 
> CacheJdbcPojoStore 
> https://ignite.apache.org/docs/latest/persistence/external-storage#cachejdbcpojostore
> In particular, it suggest to set value fields as follows:
> {code:java}
> ...
>     personType.setValueFields(new JdbcTypeField(java.sql.Types.INTEGER, "id", 
> Integer.class, "id"));
>     personType.setValueFields(new JdbcTypeField(java.sql.Types.VARCHAR, 
> "name", String.class, "name"));
> ...
> {code}
> The code above looks incorrect just because the second method call will be 
> taken into account and overrides the previous one.
> The example should be corrected:
> {code:java}
> ...
>     personType.setValueFields(
>         new JdbcTypeField(java.sql.Types.INTEGER, "id", Integer.class, "id"), 
>         new JdbcTypeField(java.sql.Types.VARCHAR, "name", String.class, 
> "name"));
> ...
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to