AnsweredAssumed Answered

MyBatis 3.1.x

Question asked by fzilic on Jun 13, 2012
Is there any chance of migration to MyBatis 3.1.x ???

That would make MultiVendor database support much nicer and easier thing.

Let me just say it would remove the need for different queries for some database vendors, and allow porters to just include sql fragments specific for such database based on _databaseId property which MyBatis 3.1.x provides in each mapper file.

Check out: http://www.mybatis.org/core/configuration.html#databaseIdProvider
and http://www.mybatis.org/core/dynamic-sql.html - multivendor at the end of page

There are some differences from MyBatis 3.0.6 to MyBatis 3.1.1, but I think activiti-engine can be ported to it with relative ease. I have even tried to get it compiled with MyBatis 3.1.1 and there is just a couple of minor modifications needed to get it compiled. After that all engine tests pass with flying colours on h2 database.

I'm working on Informix port at this moment, and that feature of MyBatis would be useful. It would, also, make your mapper files much more readable by reusing most of SQL code, and just allowing specifics sql fragments where they are needed.

Outcomes