Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Code Block
xml
xml
<actions for="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="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="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>

...