Migration ToolPage edited by Pinaki PoddarChanges (7)
Full ContentMigration ToolThis command-line utility translates proprietary mapping descriptors to standard JPA mapping descriptors. Usage:
where
DiscussionThis tool takes each top-level element of the input mapping descriptor and applies one or more actions to translate it to a standard JPA mapping descriptor. <class name="com.approuter.deploy.Project" table="PROJECTS" select-before-update="false"> <id name="id" type="java.lang.Long" column="ID"> <generator class="native" /> </id> </class>
The translation was carried out by a series of _ generic, parameterized actions_. The actions are specified in migration-actions.xml. Here is a snippet from that archetype to define those generic actions and their parameters. <actions for="" class="code-quote">"class"> <rename-node to="entity"/> <rename-attr from="name" to="class"/> <promote-attr from="table" to="table" as="name"/> <ignore-attr name="select-before-update"/> <ignore-attr name="type"/> <insert-node name="attributes"/> </actions> <actions for="" class="code-quote">"id"> <rename-node to="id"/> <rename-attr from="name" to="name"/> <promote-attr from="column" to="column" as="name"> <consume-attr from="length" to="length"/> <consume-attr from="unique" to="unique"/> </promote-attr> <ignore-attr name="type"/> </actions> <actions for="" class="code-quote">"generator"> <rename-node to="generated-value"/> <rename-attr from="class" to="strategy"> <map-value from="native" to="AUTO"/> <map-value from="assigned" to="IDENTITY"/> </rename-attr> </actions> The schema that specifies what actions are supported and their parameters are defined in a XML schema.
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] OpenJPA > Migration Tool confluence
- [CONF] OpenJPA > Migration Tool confluence
- [CONF] OpenJPA > Migration Tool confluence
- [CONF] OpenJPA > Migration Tool confluence
