[
https://issues.apache.org/jira/browse/OPENJPA-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
zhang jing updated OPENJPA-1434:
--------------------------------
Attachment: patch.7z
Add one new class:
1. org.apache.openjpa.jdbc.schema.CustomXMLSchemaSearializer.java
This class extends XMLSchemaSerializer and override the function of
serialize(Collection objs),
mainly use comments one table/column to generate the class/field name mapping,
and write into test.properties
I modify three classes:
1. org.apache.openjpa.jdbc.sql.DBDictionary.java
See two "// FIX:" in the file, mainly read comments on table/column from DB
schema
2. org.apache.openjpa.jdbc.schema.SchemaGenerator.java
See two "//FIX:" in the file, mainly set comments into class table and column
3. org.apache.openjpa.jdbc.schema.SchemaTool.java
See one "//FIX:" in the file, mainly change "SchemaSerializer ser = new
XMLSchemaSerializer(conf);" to "SchemaSerializer ser = new
CustomXMLSchemaSearializer(conf);"
> I want to read comments of table and column from database schema.
> -----------------------------------------------------------------
>
> Key: OPENJPA-1434
> URL: https://issues.apache.org/jira/browse/OPENJPA-1434
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 1.2.1
> Reporter: zhang jing
> Priority: Minor
> Fix For: 1.2.1
>
> Attachments: patch.7z
>
>
> When generating schemas, I want to read the comments of table and column from
> database schema, then write them into customer.properties.
> Then when executing reverse mapping, set the class name as table comment, and
> set field name as column comment automatically.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.