Saturday, December 25, 2021

MyBatis 3.5.9 released!

Dear Community,

It has only been two weeks, but we decided to release MyBatis 3.5.9.

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.
Binaries are available on the release page and Maven Central.

We thank you for your contribution!

Sincerely,
The MyBatis Team

Sunday, December 12, 2021

MyBatis 3.5.8 released!

Dear Community,

We are pleased to announce the release of MyBatis 3.5.8.
The below is the list of notable changes.

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.
Binaries are available on the release page and Maven Central.

We thank everyone reported issues, shared ideas and answered questions from other users! 👏

Sincerely,
The MyBatis Team

Monday, April 26, 2021

MyBatis 3.5.7 released!

Dear Community,

We are pleased to announce the release of MyBatis 3.5.7.
The below is the list of user visible changes.

Bug fixes:
  • Improved performance under JDK 8. #2223

Please see the 3.5.7 milestone page for the complete list of changes.
Binaries are available on the release page and Maven Central.

We also receive many code and documentation improvements.
Thank you very much for your contributions in various forms!

Sincerely,
The MyBatis Team

Tuesday, October 6, 2020

MyBatis 3.5.6 released!

Dear Community,

We are pleased to announce the release of MyBatis 3.5.6.
The below is the list of user visible changes.

Enhancements:
  • 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

Please see the 3.5.6 milestone page for the complete list of changes.
Binaries are available on the release page and Maven Central.

We also receive many code and documentation improvements.
Thank you very much for your contributions in various forms!

Sincerely,
The MyBatis Team

Tuesday, August 11, 2020

MyBatis and CockroachDB

Several months ago, the team at Cockroach Labs reached out to the MyBatis developers asking if we could talk about officially supporting CockroachDB. CockroachDB is wire compatible with PostgreSQL and CockroachDB clients use the PostgreSQL JDBC driver to connect. The team at Cockroach Labs assumed that making changes in MyBatis to support CockroachDB would be relatively easy.

We had a few conversations and it turns out that we didn't need to make any changes in MyBatis to support CockroachDB. I think this is a great validation of the MyBatis approach to database dialects - we don't have one! MyBatis is able to execute SQL against any database that has a JDBC driver. We leave it fully in the hands of developers to write whatever SQL they need for the target database.

So our work with Cockroach Labs shifted to focus on documentation and examples. Today I'm happy to say that MyBatis has a page on the official Cockroach Labs documentation site here: https://www.cockroachlabs.com/docs/v20.1/build-a-spring-app-with-cockroachdb-mybatis.html

That page shows how to use the MyBatis Spring support to easily work with databases and it's a great example of how far these tools have come. There's no XML anywhere to be found - either for Spring or MyBatis.

You can also read a blog post from Cockroach labs here: https://www.cockroachlabs.com/blog/spring-data-access-tutorials/

I really want to thank the team at Cockroach Labs for helping us get to this point - especially Eric Harmeling, Vy Ton, and Andy Woods who have been great working partners.