11 days ago

This is a maintenance release to address the regression bug found in 3.5.12.

Bug fix:

  • Unable to resolve result type when the target property has a getter with different return type #2834
21 days ago

"The Great Cleanup"

User impactful changes

  • #2703 Referencing collection parameter by name fails fixing #2693

  • #2709 Fix a race condition caused by other threads calling mapper methods while mapped tables are being constructed

  • #2727 Enable ability to provide custom configuration to XMLConfigBuilder

  • #2731 Adding mapper could fail under JPMS

  • #2741 Add 'affectedData' attribute to @Select, @SelectProvider, and <select />

  • #2767 Resolve resultType by namespace and id when not provided resultType and resultMap

  • #2804 Search readable property when resolving constructor arg type by name

  • Minor correction: 'boolean' can never be null (primative)

  • General library updates

  • Uses parameters option for compiler now (needed by spring boot 3) (for reflection needs)

Code cleanup

  • #2816 Use open rewrite to partially cleanup java code
  • #2817 Add private constructors per open rewrite
  • #2819 Add final where appropriate per open rewrite
  • #2825 Cleanup if statement breaks / return logic
  • #2826 Eclipse based cleanup


  • #2820 Remove test ci group profile in favor of more direct usage on GH-Actions and update deprecated surefire along in overview in
  • Adjustments to build so shaded ognl and javassist no longer throw warnings
  • Build with jdk 21-ea as well now
  • Various test cleanup, updates, and additions
  • Turn on auto formatting of all java code including note to contributors on readme to skip formatting when necessary in code blocks
  • Tests may use jdk 11 now while retaining jdk 8 runtime
  • Pom cleanup / better clarification on parameters


  • Various documentation updates

For Contributors:

  • Mybatis is now using auto formatting of the code base. If contribution needs special formatting such as annotations or specific javadocs that conflict with formatting rules, use // @formatter:off and // @formatter:on around block of code to be ignored on formatting. If within a javadoc, since its a comment type, the entire thing is affected so just wrap this around the entire javadoc. Try to ensure code inside the non formatting block is appropriately formatted otherwise to ease readability.

What's Changed

New Contributors

Full Changelog:

2022-09-19 04:26:30

Bug fixes:

  • OGNL could throw IllegalArgumentException when invoking inherited method. #2609
  • returnInstanceForEmptyRow is not applied to constructor auto-mapping. #2665

There is no known backward incompatible change since 3.5.10.

Please see the 3.5.11 milestone page for the complete list of changes.

2022-05-24 04:03:39

Bug fixes:

  • Unexpected illegal reflective access warning (or InaccessibleObjectException on Java 16+) when calling method in OGNL expression. #2392
  • IllegalAccessException when auto-mapping Records (JEP-359) #2195
  • 'interrupted' status is not set when PooledConnection#getConnection() is interrupted. #2503


  • A new option argNameBasedConstructorAutoMapping is added. If enabled, constructor argument names are used to look up columns when auto-mapping. #2192
  • Added a new property skipSetAutoCommitOnClose to JdbcTransactionFactory. Skipping setAutoCommit() call could improve performance with some drivers. #2426
  • <idArg /> can now be listed after <arg /> in <constructor />. #2541

There is no known backward incompatible change since 3.5.9.

Please see the 3.5.10 milestone page for the complete list of changes.

2021-12-26 02:27:29

List of changes:

  • Add nullable to <collection />. If enabled, it skips the iteration when the collection is null instead of throwing an exception. To enable this feature globally, set nullableOnForEach=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.

2021-12-13 00:38:20

List of changes:

  • Avoid NullPointerException when mapping an empty string to java.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.

2021-04-26 03:42:20

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.

2020-10-07 04:25:11


  • A new configuration option defaultSqlProviderType is added. The specified class will be used as the SQL provider when the value() or type() is not specified in @SelectProvider, @UpdateProvider, @InsertProvider and @DeleteProvider. #1951
  • A new transaction isolation level SQL_SERVER_SNAPSHOT is added to TransactionIsolationLevel enum to support the MS SQL Server specific isolation level SNAPSHOT. #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 using BlockingCache. #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.

2020-06-04 23:09:29


  • You can reference single List or Collection type parameter using its actual parameter name when useActualParamName 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.

2020-02-02 23:03:21


  • 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.3.

Please see the 3.5.4 milestone page for the complete list of changes.