Releases: mybatis/mybatis-3
mybatis-3.5.17
Bugs:
VendorDatabaseIdProvider#getDatabaseId()
should return product name when properties is empty #3297- Update
NClobTypeHandler
to use methods for national character set #3298
Enhancements:
- Allow
DefaultSqlSessionFactory
to provide a customSqlSession
#3128
There also are many pull requests for document updates and code improvements!
Please see the full changelog: mybatis-3.5.16...mybatis-3.5.17
mybatis-3.5.16
Security:
- Prevent
Invocation
from being used by vulnerable applications. #3115
Bugs:
- When database ID resolution is failed, invalid bound statement is used. #3040
Enhancements:
- It is now possible to write a custom map wrapper to customize how to map column name with dots or brackets. #13 #3062
Performance:
- Improved compatibility with Virtual Threads introduced by Loom.
- Reduced memory footprint when performing the default (i.e. order based) constructor auto-mapping. #3113
Build:
- Include the shaded libraries (OGNL and Javassist) in the sources.jar.
Please see the 3.5.16 milestone page or commit log for the complete list of changes.
Mybatis 3.5.15
Changes
- XNode#toString() should output all child nodes. See #3001 and associated tickets on this issue
- Fix performance of mappedColumnNames.contains by using 'set' rather than 'list'. See #3023
- Fix osgi issue with javassist. See #3031
- Updated shaded OGNL to 3.4.2. See #3035
- Add support method for generating dynamic sql on SQL class. See #2887
- General library updates
- General document updates
Build
- We now show builds from java 11, 17, 21, and 22 on Github Actions. Code is still java 8 compatible at this time.
- Update vulnerable hsqldb to 2.7.2 fixing our tests that now work due to newer support. Note, users were never affected by this but at least one user pull request was attempted opened in addition to both renovate and dependabot and various reporting on it.
- Now using more properties to define versions in pom to lower the frequency of pull requests from renovate
Site
- We have moved to maven site 4.0.0 using site xsd 2.0.0. This resulted in us needing to turn off the PDF documentation of our site. Please just use our site pages for now.
- Due to site changes, if anyone finds any issues, please be sure to report them as the upgrade path with maven has been disappointing at best. We believe we got all setup correctly but will fix anything as quickly as discovered problematic. We apologize in advance of this situation as we work through maven 4 site changes.
mybatis-3.5.14
Bug fixes:
- Registered type handler is not used for anonymous enums #2956
- Discriminator does not work in constructor mapping #2913
There is no known backward incompatible change since 3.5.13.
Please see the 3.5.14 milestone page for the complete list of changes.
mybatis-3.5.13
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
Mybatis 3.5.12 Release
"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
Build
- #2820 Remove test ci group profile in favor of more direct usage on GH-Actions and update deprecated surefire along in overview in README.md
- 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
Documentation
- 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
- Update junit5 monorepo to v5.9.1 by @renovate in #2702
- Update dependency org.slf4j:slf4j-api to v2.0.2 by @renovate in #2701
- Referencing collection parameter by name fails ... by @harawata in #2703
- Update dependency org.slf4j:slf4j-api to v2.0.3 by @renovate in #2704
- Update dependency org.testcontainers:junit-jupiter to v1.17.4 by @renovate in #2706
- Update dependency org.testcontainers:postgresql to v1.17.4 by @renovate in #2708
- Update dependency org.testcontainers:mysql to v1.17.4 by @renovate in #2707
- Update dependency ch.qos.logback:logback-classic to v1.4.2 by @renovate in #2710
- Update dependency ch.qos.logback:logback-classic to v1.4.3 by @renovate in #2711
- Update dependency org.testcontainers:postgresql to v1.17.5 by @renovate in #2714
- Update dependency org.testcontainers:junit-jupiter to v1.17.5 by @renovate in #2712
- Update dependency org.testcontainers:mysql to v1.17.5 by @renovate in #2713
- Update dependency ch.qos.logback:logback-classic to v1.4.4 by @renovate in #2716
- Update dependency mysql:mysql-connector-java to v8.0.31 by @renovate in #2720
- Update dependency org.mockito:mockito-junit-jupiter to v4.8.1 by @renovate in #2719
- Update dependency org.mockito:mockito-core to v4.8.1 by @renovate in #2725
- Enable ability to provide custom configuration to XMLConfigBuilder by @epochcoder in #2727
- Fix a race condition caused by other threads calling mapper methods while mappedStatements are being constructed by @tianshuang in #2709
- Adding mapper could fail under JPMS by @harawata in #2731
- Update mockito monorepo to v4.9.0 by @renovate in #2733
- Update dependency org.testcontainers:mysql to v1.17.6 by @renovate in #2737
- Update dependency org.testcontainers:junit-jupiter to v1.17.6 by @renovate in #2736
- Update dependency org.testcontainers:postgresql to v1.17.6 by @renovate in #2738
- Update dependency org.slf4j:slf4j-api to v2.0.4 by @renovate in #2739
- Bump postgresql from 42.5.0 to 42.5.1 by @dependabot in #2744
- Update dependency ch.qos.reload4j:reload4j to v1.2.23 by @renovate in #2742
- Update dependency ch.qos.logback:logback-classic to v1.4.5 by @renovate in #2740
- Update dependency org.slf4j:slf4j-api to v2.0.5 by @renovate in #2745
- Add
affectData
attribute to@Select
,@SelectProvider
and<select />
by @harawata in #2741 - Update dependency ch.qos.reload4j:reload4j to v1.2.24 by @renovate in #2748
- [pom] Update mysql-connector-j to new GAV relocation by @hazendaz in #2751
- [ci] Cleanup charset usage by @hazendaz in #2752
- [pom] Add filter to exclude MANIFEST.MF from uber jar from other jars… by @hazendaz in #2753
- Update dependency org.slf4j:slf4j-api to v2.0.6 by @renovate in #2755
- Update mockito monorepo to v4.10.0 by @renovate in #2756
- Update dependency org.mybatis:mybatis-parent to v37 by @renovate in #2766
- Update mockito monorepo to v4.11.0 by @renovate in #2765
- [actions] Drop jdk 18 by @hazendaz in #2768
- Use method signature to resolve
resultType
of<select>
by @FlyInWind1 in #2767 - Update dependency org.assertj:assertj-core to v3.24.1 by @renovate in #2769
- Update junit5 monorepo to v5.9.2 by @renovate in #2772
- Update mockito monorepo to v5 (major) by @renovate in #2774
- Update dependency org.assertj:assertj-core to v3.24.2 by @renovate in #2775
- Update dependency com.mysql:mysql-connector-j to v8.0.32 by @renovate in #2776
- Update dependency maven to v3.8.7 by @renovate in #2779
- [pom] Add mockito subclass support by @hazendaz in #2781
- Include JDK 21 in CI build by @harawata in #2780
- Update mockito monorepo to v5.1.0 by @renovate in #2782
- Update mockito monorepo to v5.1.1 by @renovate in #2783
- Update dependency org.postgresql:postgresql to v42.5.2 by @renovate in #2785
- [ci] Type the array lists by @hazendaz in #2788
- Road toward turning on auto formatting by @hazendaz in #2790
- [ci] Formatting by @hazendaz in #2791
- [ci] Formatting by @hazendaz in #2792
- [ci] formatting by @hazendaz in #2793
- Update dependency org.postgresql:postgresql to v42.5.3 by @renovate in #2789
- [ci] Formatting by @hazendaz in #2794
- [ci] formatting by @hazendaz in #2795
- [ci] formatting by @hazendaz in #2796
- [ci] formatting by @hazendaz in #2797
- [ci] formatting by @hazendaz in #2798
- [ci] Fix readme for formatter tags by @hazendaz in #2799
- [mvn] Bump to maven 3.9.0 and change maven.config to 3.9/4.x style by @hazendaz in #2801
- Search readable property when resolving constructor arg type by name by @harawata in #2804
- Update test code to clarify the consequence by @hogimn in #2805
- Update dependency org.postgresql:postgresql to v42.5.4 by @renovate in #2808
- Add Unit Test for PooledDataSource by @hogimn in #2809
- [ci] Minor formatting adjustments by @hazendaz in #2814
- [ci] Fix end of line markers at end of file per git standards (ie emp… by @hazendaz in #2815
- [ci] Apply...
mybatis-3.5.11
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.
mybatis-3.5.10
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
Enhancements:
- 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
toJdbcTransactionFactory
. SkippingsetAutoCommit()
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.
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.