[
https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17215908#comment-17215908
]
ASF GitHub Bot commented on GEODE-8626:
---------------------------------------
masaki-yamakawa opened a new pull request #5637:
URL: https://github.com/apache/geode/pull/5637
Use the default mapping when using the Simple JDBC Connector in cache.xml
and without the field-mapping tag
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [X] Is there a JIRA ticket associated with this PR? Is it referenced in
the commit message?
- [X] Has your PR been rebased against the latest commit within the target
branch (typically `develop`)?
- [X] Is your initial contribution a single, squashed commit?
- [X] Does `gradlew build` run cleanly?
- [X] Have you written or updated unit tests to verify your changes?
- [-] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
### Note:
Please ensure that once the PR is submitted, check Concourse for build
issues and
submit an update to your PR as soon as possible. If you need help, please
send an
email to [email protected].
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> 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
>
> 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)