That would be a really simple change.

What I've been really getting used to though is configuring the datasource
in XML, and then using Java for most everything else.

For example, I have this in a class called IbatisConfig:

      final String resource = "com/myapp/data/IbatisConfig.xml";
      final Reader reader = Resources.getResourceAsReader(resource);
      final SqlSessionFactory sessionFactory = new
SqlSessionFactoryBuilder().build(reader);
      final Configuration configuration = sessionFactory.getConfiguration();
      TypeAliasRegistry typeAliasRegistry =
configuration.getTypeAliasRegistry();
      typeAliasRegistry.registerAlias(User.class);
      typeAliasRegistry.registerAlias(Project.class);
      typeAliasRegistry.registerAlias(Category.class);
      typeAliasRegistry.registerAlias(Type.class);
      configuration.addMapper(UserMapper.class);
      configuration.addMapper(ProjectMapper.class);
      configuration.addMapper(SessionMapper.class);
      return sessionFactory;

Clinton

On Thu, May 13, 2010 at 5:10 PM, Rick R <ric...@gmail.com> wrote:

>
>
> On Thu, May 13, 2010 at 4:50 PM, Larry Meadors <larry.mead...@gmail.com>wrote:
>
>> He wants to represent that in the xml config.
>>
>
>
> Right. It seems odd that you can manually add the Mapper through Java (as
> Jeff has shown), but not through the xml config.
>
>
>
>
>

Reply via email to