mybatis-3.5.0
·
3048 commits
to master
since this release
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
columnPrefixin 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'sresultTypefrom the enclosingresultMap. #486 - Allow specifying
columnPrefixin constructor mapping. #968 - Combination of
@CacheNamespaceand<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
Cursorwith Db2. #1345 - Avoid exception when using
Cursorwith 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
javaTypefor<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.
- Specifying
keyPropertyis now mandatory when usinguseGeneratedKeys. If you relied on the implicit default value (="id"), generated keys will be silently ignored. #1198 - Using
Cursornow requires a driver that supports JDBC 4.1 API. #1351 - If you extended
org.apache.ibatis.type.BaseTypeHandler, you might need to addwasNull()check in your type handler. #1144 - The default
resultSetTypevalue has been changed fromFORWARD_ONLYtoUNSET. This is applied only to annotation based mappers (for XML based mappers, the default is/wasUNSET). #1334 - If you extended
org.apache.ibatis.transaction.jdbc.JdbcTransactionfor some reason, the propertyautoCommmithas been renamed toautoCommit. #941