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.

Thursday, June 4, 2020

MyBatis 3.5.5 released!

Dear Community,

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

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

Please see the 3.5.5 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

Monday, February 3, 2020

MyBatis 3.5.4 released!

Dear Community,

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

Enhancements:
  • You can now omit unnecessary `@Results` and `@ConstructorArgs` annotation. #1698
Bugs:
  • 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

Please see the 3.5.4 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