You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/09/11 00:04:00 UTC
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of
cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17413443#comment-17413443 ]
ASF subversion and git services commented on GEODE-8626:
--------------------------------------------------------
Commit 723429f291f48f309acc3407f1405339ddbcfc20 in geode's branch refs/heads/develop from Masaki Yamakawa
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=723429f ]
GEODE-8626: Omitting field-mapping tag of cache.xml when using Simple JDBC Connector (#5637)
* Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
* Use the default mapping when using the Simple JDBC Connector in cache.xml and without the field-mapping tag
* Move some methods of CreateMappingPreconditionCheckFunction class to JdbcConnectorServiceImpl class
> Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
> ------------------------------------------------------------------------
>
> Key: GEODE-8626
> URL: https://issues.apache.org/jira/browse/GEODE-8626
> Project: Geode
> Issue Type: Improvement
> Components: jdbc
> Reporter: Masaki Yamakawa
> Priority: Minor
> Labels: pull-request-available
>
> When configuring Simple JDBC Connector with gfsh, I don't need to create field-mapping, the default field-mapping will be created from pdx and table meta data.
> On the other hand, when using cache.xml(cluster.xml), pdx and table meta data cannot be used, and field-mapping must be described in cache.xml.
> I would like to create field-mapping defaults based on pdx and table meta data when using cache.xml.
> If field-mapping is specified in cache.xml, the xml setting has priority, and only if there are no field-mapping tags.
> cache.xml will be as follows:
> {code:java}
> <region name="Region1" refid="REPLICATE">
> <jdbc:mapping
> data-source="TestDataSource"
> table="employees"
> pdx-name="org.apache.geode.connectors.jdbc.Employee"
> ids="id">
> <!-- no need to jdbc:field-mapping tag
> <jdbc:field-mapping pdx-name="id" pdx-type="STRING" jdbc-name="id" jdbc-type="VARCHAR" jdbc-nullable="false"/>
> <jdbc:field-mapping pdx-name="name" pdx-type="STRING" jdbc-name="name" jdbc-type="VARCHAR" jdbc-nullable="true"/>
> <jdbc:field-mapping pdx-name="age" pdx-type="INT" jdbc-name="age" jdbc-type="INTEGER" jdbc-nullable="true"/>
> -->
> </jdbc:mapping>
> </region>
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)