MyBatis v3.5.0 Release Notes

Release Date: 2019-01-20 // about 5 years ago
  • MyBatis 3.5.0 requires Java 8 and later.

    โœจ Enhancements:

    • โš  Avoid 'Illegal reflective access' warning on JDK 9+. #1156
    • โž• Added Automatic-Module-Name : org.mybatis #1199
    • ๐Ÿ‘Œ Support java.util.Optional as return type of mapper method. #799
    • Avoid unnecessary wasNull() calls from the built-in type handlers. #1244
    • It is now possible to specify columnPrefix in constructor arguments. #968
    • ๐Ÿ‘Œ Improved reliability when searching constructor for auto-mapping. #1277
    • ๐Ÿ“ฆ It is now possible to access private, package private and protected members in OGNL expressions. #1258
    • ๐Ÿ‘ป Throw exception if the specified keyProperty is not found when assigning generated keys.  #1250
    • โž• Added a type handler for SQLXML data type. #1221
    • ๐Ÿ‘ Allow accessing private, package private and protected members in OGNL expression. #1258
    • <set /> tag now trims the leading comma. #21
    • Infer <case /> tag's resultType from the enclosing resultMap. #486
    • ๐Ÿ‘ Allow specifying columnPrefix in constructor mapping. #968
    • ๐Ÿ‘ป Combination of @CacheNamespace and <cache-ref /> does not throw exception anymore. #1194
    • ๐Ÿ‘Œ Support Log4J 2.6+. #1210
    • ๐Ÿ‘ Slightly improved compatibility with drivers that only support JDBC 3 API. #1386
    • โฌ†๏ธ Upgraded testing framework to JUnit 5. #1425

    ๐Ÿ› Bug fixes:

    • OffsetDateTimeTypeHandler, OffsetTimeTypeHandler and ZonedDateTimeTypeHandler loses time zone information. #1081
    • Avoid SQLException when using Cursor with Db2. #1345
    • ๐Ÿ‘€ Avoid exception when using Cursor with ReuseExecutor. #1351
    • RowBounds with out-of-range offset causes SQLException on DB2. #1355
    • ๐ŸŒฒ Specified logging implementation is not used in some classes. #1272
    • Unable to resolve javaType for <association />. #1381
    • Deeply nested (3+ levels) result map could cause IllegalArgumentException. #1176
    • Generic type parameter is not correctly resolved when the class hierarchy is deeper than 3 levels. #1260

    ๐Ÿ‘€ Please see the 3.5.0 milestone page for the complete list of changes.

    ๐Ÿš€ Note that there are some backward incompatible changes since the last release 3.4.6.

    • 0๏ธโƒฃ Specifying keyProperty is now mandatory when using useGeneratedKeys. If you relied on the implicit default value (="id"), generated keys will be silently ignored. #1198
    • ๐Ÿ‘ Using Cursor now requires a driver that supports JDBC 4.1 API. #1351
    • If you extended org.apache.ibatis.type.BaseTypeHandler, you might need to add wasNull() check in your type handler. #1144
    • 0๏ธโƒฃ The default resultSetType value has been changed from FORWARD_ONLY to UNSET. This is applied only to annotation based mappers (for XML based mappers, the default is/was UNSET). #1334
    • If you extended org.apache.ibatis.transaction.jdbc.JdbcTransaction for some reason, the property autoCommmit has been renamed to autoCommit. #941