Migrating from Abator
This page details changes between MyBatis Generator (MBG)
and Abator. For most users, the changes should be simple.
If you extended any of Abator's classes to supply custom implementations
of code generators or the Java type resolver, you will need to rework
those custom classes.
The changes are listed in three categories: from required
configuration changes to less common changes. Note that most changes
are described assuming you are using XML configuration for MBG. If you
are using Java based configuration, then the changes are still required
and should be easy to deduce from the description of the XML changes.
Required for All Users
- The DTD has changed. The new DOCTYPE should be
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
- The <abatorConfiguration> element is renamed to
- The <abatorContext> element is renamed to
- The <daoGenerator> element is renamed to
Required for Many Users
- MyBatis3 is now the default target runtime.
- <context> element now requires an ID
- The generatorSet attribute is removed from the
<context> element and replaced with the
targetRuntime attribute. Valid values for this
attribute are Ibatis2Java2, Ibatis2Java5,
MBG does not include the legacy generator set from
Abator - so iBATIS version 2.2.0 or higher is required for
the code generated by MyBatis Generator.
- The MBG classloading strategy has changed substantially, and we now recommend that
you manage the runtime classpath external to MBG. If you manage the classpath with
configuration entries, you must make the
following changes from Abator:
- Class path entries are specified at the configuration file level
with the <classPathEntry>
element - now a child element of <generatorConfiguration> only.
- A <classPathEntry> element is not longer allowed as a child
- The "rootClasspath" property is no longer valid for the <javaModelGenerator>
Rarely Required Changes
- The type attribute is removed from both the
<sqlMapGenerator> elements. MBG has an entirely
different method of supplying custom code generators than Abator.
See the Extending MyBatis Generator
page for full details.
- The JavaTypeResolver interface has changed and is
simplified. If you specified a custom implementation on the
<javaTypeResolver> element, you must rework your implementation
- The ProgressCallback interface has changed significantly. If you implemented
this interface for some other execution environment, you will need to rework your implementation.