Releases: mybatis/mybatis-3
mybatis-3.5.9
List of changes:
- Add
nullable
to<foreach />
. If enabled, it skips the iteration when the collection isnull
instead of throwing an exception. To enable this feature globally, setnullableOnForEach=true
in the config. #1883
We also updated the version of Log4J dependency to 2.17.0.
Note that the scope of Log4J dependency in MyBatis' pom.xml is 'optional' and it is very important for you to understand what it means.
- You can use MyBatis without Log4J.
- Adding MyBatis to your project's dependency does not bring in Log4J implicitly.
- Updating MyBatis version does not make your project safer because it does not affect the Log4J version in your project.
- Regardless of the MyBatis version you are using, you can/have to update Log4J version independently.
Please see theΒ 3.5.9 milestone pageΒ for the complete list of changes.
There is no known backward incompatible change since 3.5.8.
mybatis-3.5.8
List of changes:
- Avoid
NullPointerException
when mapping an empty string tojava.lang.Character
. #2368 - Fixed an incorrect argument when initializing static object. This resolves a compatibility issue with quarkus-mybatis. #2284
- Performance improvements. #2297 #2335 #2340
- And many doc updates!
Please see theΒ 3.5.8 milestone pageΒ for the complete list of changes.
There is no known backward incompatible change since 3.5.7.
mybatis-3.5.7
Bug fixes:
- Improved performance under JDK 8. #2223
There is no known backward incompatible change since 3.5.6.
Please see theΒ 3.5.7 milestone pageΒ for the complete list of changes.
mybatis-3.5.6
Enhancements:
- A new configuration option
defaultSqlProviderType
is added. The specified class will be used as the SQL provider when thevalue()
ortype()
is not specified in@SelectProvider
,@UpdateProvider
,@InsertProvider
and@DeleteProvider
. #1951 - A new transaction isolation level
SQL_SERVER_SNAPSHOT
is added toTransactionIsolationLevel
enum to support the MS SQL Server specific isolation levelSNAPSHOT
. #1973 - When there is no JEP-290 serialization filter defined, a WARN level message is logged on deserializing object streams. #2079
Bug fixes:
- Possible
NoSuchPropertyException
under heavy load. #1648 - Possible
InvalidPathException
when registering type aliases by specifying package name. #1974 - Possible
OutOfMemoryError
when usingBlockingCache
. #2044
There is no known backward incompatible change since 3.5.5.
Please see theΒ 3.5.6 milestone pageΒ for the complete list of changes.
mybatis-3.5.5
Enhancements:
- You can reference single
List
orCollection
type parameter using its actual parameter name whenuseActualParamName
is enabled. #1237 - You can specify
resultMap
in@One
and@Many
. #1771 - You can specify
columnPrefix
in@One
and@Many
. #1829 - A new option
shrinkWhitespacesInSql
to remove extra whitespaces in SQL. #1901
Bug fixes:
- Possible IllegalArgumentException when using
@CacheNamespaceRef
. #1719 - Mapper method invocation should be non-blocking (work around JDK-8161372). #1929
There is no known backward incompatible change since 3.5.4.
Please see theΒ 3.5.5 milestone pageΒ for the complete list of changes.
mybatis-3.5.4
Enhancements:
- You can now omit unnecessary
@Results
and@ConstructorArgs
annotation. #1698
Bug fixes:
- Avoid invoking hashCode() method when setting auto-generated keys. #1719
- Possible ResultMapException when using nested select. #1551
- Possible incorrect TypeVariable resolution in TypeParameterResolver. #1794
- Race condition in TypeHandlerRegistry. #1819
There is no known backward incompatible change since 3.5.οΌ.
Please see theΒ 3.5.4 milestone pageΒ for the complete list of changes.
mybatis-3.5.3
Enhancements:
- Support variable substitution in CDATA of included
<sql />
. #1615 - Support default method invocation on JDK 14+8 or later. #1626
- Avoid illegal reflective access warning when invoking default mapper method. #1636
- Ambiguous getter/setter now throws ReflectionException only when it is actually accessed. #1201
Bug fixes:
- Possible infinite loop when a SQL provider throws an exception. #1616
- Unable to iterate Cursor if the next element is null. #1653
- queryCursor() fails in streaming mode of MySQL Connector/J. #1654
There is no known backward incompatible change since 3.5.2.
Please see theΒ 3.5.3 milestone pageΒ for the complete list of changes.
mybatis-3.5.2
Enhancements:
- SQL builder now supports LIMIT, OFFSET #1521 and FETCH FIRST #1582.
- SQL builder now supports multi-row insert syntax #1333.
- A new property
defaultNetworkTimeout
has been added to the built-in data sources i.e.PooledDataSource
andUnpooledDataSource
#1527. - SQL provider annotations now takes
value
attribute which is an alias fortype
#1522. - You can now pass Java array to
ArrayTypeHandler#setNonNullParameter()
#1548. - You can reference single simple type unnamed parameter with any name in OGNL expressions #1487.
- A new configuration option
defaultResultSetType
is added #1056.
Bugs:
- SQL provider method with a primitive parameter causes BuilderException #1604.
- Fixes a possible
NullPointerException
#1590.
There is no known backward incompatible change since 3.5.1.
Please see the 3.5.2 milestone page for the complete list of changes.
mybatis-3.5.1
Bug fixes:
keyProperty
specified with parameter name could cause ExecutorException. #1485- False positive error 'Ambiguous collection type ...' . #1472
EnumTypeHandler
is not used when the enum has methods. #1489- Auto-mapping fails in a result map referenced from a constructor arg with
columnPrefix
. #1496 - Constructor auto-mapping could fail when
columnPrefix
is specified in the parent result map. #1495 LocalTimeTypeHandler
loses fractional seconds part. #1478LocalDateTypeHandler
andLocalDateTimeTypeHandler
could return unexpected value. #1478
Enhancements:
- You can now return 'script' from a SQL provider. The returned script is parsed using the language driver specified by
@Lang
. #1391 - You can now omit
method
attribute from SQL provider annotations when the provider method has the same name as the mapper method or its name isprovideSql
. #1279 - You can now get
databaseId
in SQL providers. #1503 - The default type handler for
LONGVARCHAR
is changed fromClobTypeHandler
toStringTypeHandler
. This improves compatibility with SAP ASE. #1484
There is a backward incompatible change.
mybatis-3.5.0
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'sresultType
from the enclosingresultMap
. #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.
- Specifying
keyProperty
is now mandatory when usinguseGeneratedKeys
. 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 addwasNull()
check in your type handler. #1144 - The default
resultSetType
value has been changed fromFORWARD_ONLY
toUNSET
. 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.JdbcTransaction
for some reason, the propertyautoCommmit
has been renamed toautoCommit
. #941