Migration ToolPage edited by Donald Woods
Comment:
added links to prebuilt jar and source code
Changes (1)
Full ContentMigration ToolThis command-line utility translates proprietary mapping descriptors to standard JPA mapping descriptors. DownloadThe latest OpenJPA Tools JAR file can be download from the SNAPSHOT Repository or can be built from the source code in svn by using Maven 2.2.1 and Java SE 6. 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
