Skip to content

Changelog

[v3.5.12] 2025.04.27

  • fix: Fix NoSuchElementException that might occur during the first asynchronous execution of batch operations.
  • fix: Fix task rejection caused by the default SQL parsing thread pool shutting down on JVM exit.
  • fix: Fix incorrect toString method style generated by entity.java.btl.
  • fix: Fix missing newlines in template class comments and import statements in entity.java.ftl.
  • opt: Refactor SqlRunner to execute SQL statements (dynamic parameters, no longer generating SQL based on parameter values).
  • opt: Enhance SqlRunner execution (supports single parameter retrieval using Map({key}), List({index}), JavaBean({property})).
  • opt: Improve MybatisUtils’s extraction of SqlSessionFactory (supports custom SqlSessionTemplate subclasses).
  • opt: Automatically recognize database support for TDengine database websocket connections.
  • opt: Support multiple data sources for Db utility class.
  • opt: Optimize MapperProxy property access.
  • opt: Add getBean and getProxyTargetObject methods to CompatibleSet interface.
  • opt: Move CompatibleSet and CompatibleHelper to com.baomidou.mybatisplus.core.spi package.
  • opt: Support manual specification of CompatibleSet implementation.
  • opt: Code generator handles null index information returned by the driver.
  • opt: Code generator handles primary key index cases starting with PRIMARY_KEY_.
  • opt: Remove @Override annotation from entity.kt.btl template.
  • opt: Resolve inconsistent formatting generated by serviceImpl.java.ej.
  • opt: Remove redundant newline generation in mapper.java.ftl.
  • opt: Remove import statement delimiters at the end of entity.kt.vm, entity.kt.ej, entity.kt.btl.
  • opt: Remove redundant newlines in controller.java.ej, controller.java.vm.
  • opt: Remove redundant spaces in generated properties of entity.kt.btl.
  • opt: Unify toString method style generated by entity.java.btl, entity.java.ej, entity.java.ftl, entity.java.vm.

[v3.5.11] 2025.03.23

  • fix: Fix code generator generating @Accessors annotation in chain model when not using lombok.
  • fix: Fix error when performing batch deletion using UUID as primary key.
  • fix: Fix Kotlin select(predicate) method error.
  • fix: Fix asynchronous errors in AbstractCaffeineJsqlParseCache.
  • fix: Fix merge errors caused by dynamic SQL parsing containing SQL comments (— or #) (dynamic script statements no longer process newlines; if newlines need to be removed, please handle them manually).
  • fix: Fix DataChangeRecorderInnerInterceptor data comparison causing type casting exceptions.
  • fix: Fix IllegalSQLInnerInterceptor plugin failing to get catalog and schema.
  • fix: Fix dynamic table parsing create table if not exists failing to get table name.
  • fix: Fix dynamic table parsing create [type] index failing to get table name.
  • feat: Add DynamicTableNameJsqlParserInnerInterceptor for dynamic table processing based on JsqlParser.
  • feat: Support custom script runner parameters for DdlScript.
  • feat: Support custom script runner parameters for DdlHelper.
  • feat: Support DdlApplicationRunner parameter configuration (script error handling, custom ScriptRunner, whether to interrupt execution on multi-processor exceptions).
  • feat: Support BaseMultiTableInnerInterceptor to specify append condition mode (conditions are appended to the end by default, only applies to select, delete, update).
  • feat: Support Entity generator to specify serialVersionUID with @Serial annotation.
  • feat: Support custom handling of Entity annotations (field, class annotations) in the generator.
  • feat: Support custom handling of Entity import statements in the generator.
  • feat: Support Yashan database.
  • feat: Support Hive2 pagination.
  • feat: Upgrade Gradle to 8.10.
  • feat: Support custom exception handling for DdlHelper execution.
  • opt: Adjust DynamicTableNameInnerInterceptor table processing logic and ensure hook execution.
  • opt: Adjust DdlScript class method implementation (separate DDL version recording, optimize execution method).
  • opt: Change DbType#GAUSS database name to gauss.
  • opt: Adjust JsqlParserGlobal parsing thread pool specification.
  • opt: Remove deprecated FieldStrategy.IGNORED.
  • opt: Remove deprecated GlobalConfig.DbConfig#selectStrategy.
  • opt: Remove deprecated MybatisSqlSessionFactoryBean#typeEnumsPackage.
  • opt: Optimize DdlHelper resource loading (no longer relies on Spring or other implementations).
  • opt: Remove specified character encoding for getScriptRunner method in DdlHelper.
  • doc: Correct comment errors in DdlHelper.

Since the incompatibility between jsqlParser 5.0 and 5.1 versions is not significant, we plan to remove the mybatis-plus-jsqlparser-5.0 support module later. Multi-version support is relatively troublesome, and in the future, only mybatis-plus-jsqlparser-4.9 and mybatis-plus-jsqlparser (keeping up with the latest version until JDK is further upgraded) will be maintained.

[v3.5.10.1] 2025.01.13

  • fix: Fix dynamic node processing error.

[v3.5.10] 2025.01.12

  • fix: Fix columnFormat not taking effect globally when a field has @TableField annotation but no value is specified.
  • fix: Fix error when enjoy template generates Kotlin code.
  • fix: Fix error when enjoy template generates string code.
  • fix: Fix springdoc generated annotations not escaping double quotes.
  • fix: Fix data change plugin reporting error when updating without a primary key.
  • fix: Fix out-of-bounds error when processJoins parses tables in multi-table parsing.
  • feat: Add properties attribute to TableName annotation.
  • feat: Support @InterceptorIgnore annotation on default methods.
  • feat: Adapt to jsqlparser 5.1 version (for 5.0 compatible version, please use mybatis-plus-jsqlparser-5.0).
  • feat: Provide InterceptorIgnoreHelper.execute template execution method to handle plugin skip strategy (prevents errors caused by uncleaned thread resources when manually using handle method).
  • feat: Code generator global package configuration properties support custom template information retrieval.
  • feat: Code generator adds table index information retrieval.
  • feat: Code generator provides Mapper.Builder.generateMapperMethodHandler processor to generate index methods based on indexes.
  • feat: Code generator Entity supports custom class annotation and field annotation generation.
  • feat: Code generator Entity supports specifying generated class annotations in lombok mode.
  • feat: Code generator Entity supports controlling ToString method generation via (Entity.Builder.toString(boolean)) (generated by default; in lombok mode, @ToString will be generated; in lower versions, lombok does not generate it, which is a breaking change).
  • feat: Code generator Entity supports controlling field Javadoc comments generation via (Entity.Builder.fieldUseJavaDoc(boolean)) (generated by default; in lower versions, swagger or springdoc will not generate field Javadoc comments, which is a breaking change).
  • feat: Rewrite dynamic statement generation (generated executable SQL will no longer contain \n newlines).
  • feat: Security encryption processor key retrieval supports environment variables and system properties.
  • feat: Upgrade mybatis to 3.5.19.
  • feat: Upgrade springboot to 3.4.1.
  • feat: Upgrade kotlin to 2.1.0.
  • Low practicality, incomplete syntax check, planning to remove IllegalSQLInnerInterceptor plugin.
  • Many functional defects, planning to remove DataChangeRecorderInnerInterceptor plugin.

[v3.5.9] 2024.10.23

  • opt: Optimize code generator to support visual configuration generation capabilities.
  • opt: Decouple extension packages, no longer strictly dependent on Spring development framework.
  • opt: Split jsqlparser support modules, providing mybatis-plus-jsqlparser (supports latest jsqlparser) and mybatis-plus-jsqlparser-4.9 modules. They are not included by default; you need to introduce them manually after upgrading.
  • feat: Refactor service module abstraction to CrudRepository, no longer recommending IService to avoid business layer data confusion.
  • feat: Add solon startup plugin support.
  • feat: Upgrade SpringBoot to 3.3.4.
  • feat: Upgrade velocity to 2.4.

[v3.5.8] 2024.09.18

  • fix: Resolve optimizeJoinOfCountSql deserialization unsupported issue.
  • fix: Resolve Db utility class batch operations returning inaccurate values when rewriteBatchedStatements=true.
  • fix: Fix conflict between logical deletion filling and optimistic locking.
  • fix: Fix IllegalSQLInnerInterceptor error when analyzing nested count statements.
  • fix: Upgrade jsqlParser 5.0 to resolve for update statement errors.
  • fix: Fix jsqlParser parsing optimization errors caused by negative auto-increment/decrement values.
  • fix: Fix incomplete cache clearing for removeMapper.
  • fix: Fix SqlServerQuery table comment garbled characters.
  • opt: Improve function injection validation logic.
  • opt: Adjust Page property access to private, override toString method.
  • opt: Print warning log for unsupported types in primary key generation strategy (uuid).
  • opt: Convert MybatisPlusException to PersistenceException subclass.
  • feat: Add deleteByIds empty collection handling.
  • feat: Rename selectBatchIds method to selectByIds.
  • feat: Support tableName and schema property placeholders.
  • feat: Code generator adds attribute retrieval for virtual columns.
  • feat: chain wrapper to lambda chain wrapper #6314
  • feat: Code generator adds manual specification of database drivers to be compatible with drivers that cannot be automatically registered.
  • feat: Upgrade kotlin to 2.0.0.
  • feat: Upgrade SpringBoot to 3.3.2.
  • feat: Upgrade fastjson to 2.0.52.
  • feat: Upgrade mybatis-spring to 3.0.4.
  • feat: Upgrade spring-cloud-commons to 4.1.4.
  • feat: Partial dependency upgrade and update.
  • feat: Support GoldenDB database.
  • feat: Support Duckdb database.
  • feat: Support Derby database.
  • feat: Support Vastbase database.

[v3.5.7] 2024.06.10

  • fix: Fix dynamic table name handling update ignore error.
  • fix: Fix SQLServer2005 pagination handling space error.
  • fix: Fix issues with multi-tenant queries.
  • fix: Correct JSON serialization to reduce forced type casting in non-generic scenarios.
  • fix: Fix code generator disabled template not working.
  • fix: Fix pagination count optimization error when distinct is combined with orderBy.
  • fix: Fix Dameng database code generation error.
  • fix: Fix tenant plugin special exists statements becoming ineffective.
  • fix: Fix sqlite database ddl_history error preventing table creation.
  • fix: Fix DataChangeRecorderInnerInterceptor ignore configuration being ineffective during Insert.
  • fix: Fix code generator handling non-standard JdbcType causing NullPointerException.
  • feat: BaseMapper adds batch operations and InsertOrUpdate methods.
  • feat: BaseMapper adds batch operation method returning List<BatchResult>.
  • feat: BaseMapper logical deletion methods support filling by default.
  • feat: Adjust Service layer logical deletion filling logic.
  • feat: Refactor batch deletion parameter filling logic.
  • feat: Auto-increment/decrement handles BigDecimal.
  • feat: Add Snowflake ID configuration (supports manual assignment of workerId and datacenterId or automatic acquisition via specified network card information).
  • feat: Refactor ServiceImpl generic parameter extraction.
  • feat: Modify AES key random generation.
  • feat: UpdateWrapper adds checkSqlInjection method.
  • feat: Adjust DDL script auto-configuration logic (DDL runner bean is not injected when there is no implementation or no mybatis-plus-extension module).
  • feat: Injected method deleteBatchIds renamed to deleteByIds.
  • feat: Upgrade SpringBoot to 2.7.18 and 3.2.6.
  • feat: Upgrade kotlin to 1.9.24.
  • feat: Upgrade lombok to 1.18.32.

[v3.5.6] 2024.04.08

  • fix: Fix errors caused by multi-layer proxy in generic Service.
  • fix: Fix Json type processor deserialization losing original generic type.
  • fix: Fix filler processor basic type array causing forced type errors.
  • fix: Fix Page methods removed in the previous version being retained in PageDto class.
  • fix: Fix IllegalSQLInnerInterceptor not handling Parenthesis.
  • fix: Fix IllegalSQLInnerInterceptor failing to get index information and validate index fields when table or field names are wrapped.
  • fix: Fix KtUpdateChainWrapper params not expanding when calling setSql.
  • fix: Fix useGeneratedShortKey configuration not working.
  • fix: Fix a series of issues with DataChangeRecorderInnerInterceptor.
  • feat: Remove sqlFirst and sqlComment escaping (if escaping is needed, please call escaping manually before passing).
  • feat: Change ServiceImpl to an abstract class to prevent incorrect direct instantiation.
  • feat: Refactor code generator TemplateConfig configuration; template disabling and path configuration are moved to their respective concrete implementations.
  • feat: Support composite annotations.
  • feat: Add setIncrBy (field auto-increment) and setDecrBy (field auto-decrement) methods to LambdaUpdateWrapper.
  • feat: Pass org.apache.ibatis.session.Configuration when getting injected methods.
  • feat: Add auto-increment primary key compatibility configuration switch (mybatis-plus.global-config.db-config.insert-ignore-auto-increment-column defaults to false; enabling it makes INSERT statements ignore primary key field generation).
  • feat: Add parameter filler skip method (based on MappedStatement#id).
  • feat: Add SQLite DDL automatic maintenance feature.
  • feat: Add eqSql method.
  • feat: Add SQL parsing thread pool.
  • feat: Add Snowflake ID generator initialization log printing (defaults to printing a warning log if it takes more than 5 seconds).
  • feat: Upgrade mybatis to 3.5.16.
  • feat: Upgrade spring-cloud-commons.
  • feat: Upgrade jsqlparser to 4.9.
  • test: Add CI to Github.
  • doc: Add comment that update(Wrapper) related APIs cannot be automatically filled.

[v3.5.5] 2023.12.24

  • fix: Fix databaseId configuration invalidation.
  • fix: Fix auto-increment primary key ignore injection error ignoring non-auto-increment primary key injection.
  • fix: Fix ChainWrapper mode GroupBy generating extra commas.
  • fix: Fix selectOne cache issue.
  • fix: Fix data permission multi-table support failing in some scenarios.
  • fix: Fix generator mysql type converter point conversion error.
  • fix: Fix inability to use parent class properties in kotlin.
  • fix: Fix DdlApplicationRunner auto-injection returning null causing startup errors in higher springboot versions.
  • fix: Fix RuntimeUtils security vulnerability in generator code hints.
  • feat: Add fastjson2 support.
  • feat: Upgrade gradle-wrapper to 8.4.
  • feat: Upgrade kotlin-gradle-plugin to 1.9.21.
  • feat: Upgrade mybatis to 3.5.15.
  • feat: Upgrade lombok to 1.18.30.
  • feat: Upgrade spring-boot3 to 3.2.0.
  • feat: Upgrade mybatis-spring for spring-boot2 version to 2.1.2.
  • feat: Upgrade mybatis-spring for spring-boot3 version to 3.0.3.
  • feat: Remove transaction from saveOrUpdate in generic service.
  • feat: Support Trino, Presto, GBase8s-pg, SUNDB databases.

[v3.5.4.1] 2023.11.4

  • fix: Fix conversion errors caused by Aop enhanced Mapper layer.

[v3.5.4] 2023.10.22

  • fix: Fixed SQL error when executing Insert with no fields.
  • fix: Fixed lambda not being executable for IDEA debugging under high JDK versions.
  • fix: Fixed warnings in LambdaQuery for select, groupBy, orderBy, orderByAsc, orderByDesc, and added corresponding doXxx methods to support overriding (breaking change, API methods are now final).
  • fix: Fixed no configuration prompt for inject-sql-session-on-mapper-scan.
  • fix: Fixed incorrect sorting field when @OrderBy is used with @TableId (breaking change, com.baomidou.mybatisplus.core.metadata.TableInfo.orderByFields type has been adjusted).
  • fix: Fixed type mismatch error when logically deleting by primary key in Service.
  • fix: Fixed conflict between pagination plugin Count and custom ResultHandler.
  • fix: Fixed potential reentrancy issue in field fill handler.
  • feat: Added control for whether auto-increment primary key fields are allowed to be inserted. You can use method injection to override Insert(boolean ignoreAutoIncrementColumn) or Insert(String name, boolean ignoreAutoIncrementColumn) to control whether auto-increment primary keys support write behavior.
  • feat: The deleteById (logical deletion) method in ActiveRecord mode now supports auto-fill functionality.
  • feat: Built-in generic extraction, supporting use in non-Spring ecosystem projects.
  • feat: BaseMapper added update(wrapper) update method.
  • feat: BaseMapper added streaming query methods to support big data queries.
  • feat: Code generator metadata information now exposes tableName and columnName field access.
  • feat: Added mybatis-plus-spring-boot3-starter and mybatis-plus-spring-boot3-starter-test to support SpringBoot3.
  • feat: Supported default plugin injection. When no MybatisPlusInterceptor is injected, com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor is automatically injected.
  • feat: Upgraded source code JDK development version to Java21.
  • feat: Upgraded gradle-wrapper to 8.4-rc-1.
  • feat: Upgraded kotlin-gradle-plugin to 1.9.20-Beta.
  • feat: Upgraded SpringBoot2.x version to 2.7.15.
  • feat: Upgraded lombok to 1.18.30.
  • opt: Changed mybatis-spring dependency in mybatis-plus-extension to optional (breaking change, if your project uses it outside of Spring or SpringBoot, please add the dependency manually).
  • opt: spring-boot-starter reduced useless configuration prompts (breaking change, adjusted com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties.configuration type).
  • opt: Field fill handler extraction removed fixed parameter extraction, supporting more flexible mapper method parameter extraction and fill processing.
  • opt: Removed com.baomidou.mybatisplus.core.toolkit.ReflectionKit.setAccessible method call to prevent removal in higher JDK versions.
  • opt: Adjusted selectOne method (in conjunction with streaming, extracts at most two rows, total record count no longer printed in logs).
  • opt: Optimized selectObjs method return value, reducing type casting.
  • opt: Generic Service supports multiple SqlSessionFactory injections.
  • opt: Optimized TableInfo.newInstance instance creation method.
  • opt: Removed redundant @SuppressWarnings(“serial”).

[v3.5.3.2] 2023.08.08

  • feat: Upgraded mybatis to 3.5.13, mybatis-spring to 2.1.1.
  • feat: jsqlparser provides a unified parsing class, configurable parsing functions, and added caching options.
  • feat: Added Sequence initialization debug logs.
  • feat: Parameter filler supports multi-parameter filling.
  • feat: BaseMapper added selectMaps(page, wrapper) and selectList(page, wrapper) methods.
  • feat: Optimistic lock field supports java.time.Instant.
  • feat: wrapper#apply supports configuring mapping like column={0,javaType=int,jdbcType=NUMERIC,typeHandler=xxx.xxx.MyTypeHandler}.
  • feat: Adjusted QueryWrapper to require explicit enabling of SQL injection filtering (removed SQL filtering for wrapper’s orderby).
  • feat: Added Xingruige database support.
  • feat: updateWrapper#setSql method supports dynamic parameters, refer to wrapper#apply method.
  • feat: Automatic SQL maintenance DDL supports SQL execution of stored procedures.
  • perf: ktWrapper strengthened generic restrictions.
  • fix: Fixed entity description exception when selecting springdoc document comments.
  • fix: Fixed incorrect SQL generated by Table#getAllInsertSqlColumnMaybeIf("xx.") when primary key IdType is AUTO.
  • fix: Tenant plugin supports update set subSelect scenarios.
  • fix: Fixed illegal reflective access warning in high JDK versions (Illegal reflective access by com.baomidou.mybatisplus.core.toolkit.SetAccessibleAction).
  • fix: Fixed dynamic proxy reflection error in high JDK versions (Unable to make field protected java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h accessible).
  • fix: Fixed path replacement where original ”.” was replaced with file separator ”/”.
  • fix: Fixed Beetl template engine unable to generate comments.
  • fix: Fixed Types.DOUBLE type unable to map.
  • fix: Fixed error when converting parent class public fields.
  • fix: Fixed generator unable to retrieve values via cfg.
  • fix: Fixed transaction rollback failure when MockBean in unit tests.
  • fix: Fixed non-standard naming of Warpper class nonEmptyOfWhere method, leading to execution overhead due to Ognl not caching correctly.
  • fix: ClickHouseQuery’s tableComment() method returns table comment field as ‘comment’.
  • fix: Fixed entity description exception when selecting springdoc document comments.
  • fix: Fixed SQL generation error under Table#getAllInsertSqlColumnMaybeIf(“xx.”).
  • fix: Db class added method overload for querying based on non-empty entity fields.
  • fix: Generator error for superEntityClass in Kotlin Entity files.
  • fix: Fixed inability to retrieve table comments in springdoc freemarker mode.
  • opt: Enhanced parameter fill handler to prevent conversion errors due to type mismatch when parameter name and fill name are identical.
  • opt: Optimized method injection, removed SelectPage, SelectMapsPage, SelectByMap, DeleteByMap injections.
  • opt: Reduced MappedStatement heap memory usage.
  • opt: Resolved performance overhead caused by PluginUtils repeatedly acquiring metadata.
  • opt: Removed redundant newlines from injected methods.
  • opt: Removed sqlSessionFactory variable held by SqlRunner.
  • opt: Resolved Sequence initialization multiple times issue (default primary key generator can be omitted in custom scenarios).
  • opt: Optimized SqlHelper#getMapper return generic type.
  • opt: Removed sqlSessionFactory variable held by SqlRunner.
  • docs: Corrected DdlHelper comment errors.

[v3.5.3.1] 2022.12.29

  • bug: Increased pg and dm statement mode names in generation module.
  • feat: Optimized ChainWrapper#getEntityClass.
  • fix: Fixed error when IService.lambdaQuery().one() is used and no data exists in the database.
  • (Note): For EST and tenant plugins, when parsing SQL with multiple tables, aliases must be provided for tables.

[v3.5.3] 2022.12.28

  • Multi-tenant plugin: Table names in multi-table joins must have aliases, otherwise appended filter conditions will not have prefixes.
  • InterceptorIgnore cannot filter selectKey issue.
  • Pagination added informix database support.
  • Pagination added Youxuan database support.
  • Pagination added TDengine database support.
  • Pagination added Amazon Redshift database support.
  • Supports Spring Boot 2.7 and above.
  • Snowflake ID added reverse timestamp parsing method Sequence#parseIdTimestamp.
  • BaseMapper.selectCount generated statement includes AS total.
  • Fixed IllegalSQLInnerInterceptor ClassCastException and optimized logs.
  • Removed deprecated isDesc attribute from @OrderBy annotation.
  • Removed deprecated TableInfo methods.
  • Added JoinTableInfoInitHandler class to participate in TableInfo initialization.
  • Fixed StringUtils.sqlInjectionReplaceBlank method not fully filtering SQL, potentially leading to SQL injection.
  • Added IService.lambdaQuery(entity) support for more convenient writing.
  • Added data change record (data audit) plugin DataChangeRecorderInnerInterceptor.
  • Added query condition methods notLikeLeft and notLikeRight.
  • Optimized data permission multi-table parsing.
  • Allowed subclasses to override orderBy base method gitee issues/I61F51.
  • Added Db class, adjusted SimpleQuery class.
  • Added script automatic maintenance feature.
  • Added support for manual interceptor ignore strategy, e.g., InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().tenantLine(true).build());.
  • Supported PG data field uppercase ID auto-increment fixed issues/I4T0YJ.
  • Code generator refactoring completed, merged back into MP core codebase.
  • Code generator added switch for whether to generate service interfaces.

[v3.5.2] 2022.06.01

  • Upgraded mybatis to 3.5.10.
  • Upgraded jsqlparser to 4.4.
  • Added vertical database pagination support.
  • Added Gbase 8s database support.
  • Added Xingyun database pagination support.
  • Added Firebird database pagination support.
  • Fixed parameter fill judgment error, marked replacement field constants.
  • DbType cleanup and IDialect implementation class cleanup.
  • Added SqlHelper.execute to get BaseMapper via entityClass.
  • Enum handling optimized, no longer requires ‘typeEnumsPackage’ configuration.
  • fix: Execution order of tenant ID acquisition.
  • Added KeyGenerator for Firebird database.
  • Added KeyGenerator for Dameng Dm database.
  • Merge pull request #4343 from LK820/fix-IdType.java.
  • Merge pull request #4495 from nieqiurong/fix-parameter.
  • Merge pull request #4314 from tomalloc/3.0.

[v3.5.1] 2022.01.25

  • Added Impala database support.
  • Cached dynamic acquisition of database type.
  • Added controllable ID allocation method fixed github pull/4231.
  • Delayed enum scan registration.
  • Optimistic lock plugin supports filling based on wrapper github pull/3664.
  • H2KeyGenerator syntax modification.
  • SimpleQuery optimization and bug fixes.
  • fixed gitee issues/I4P9EN.
  • SybaseDialect keyword replacement optimization.

[v3.5.0] 2022.01.01

  • Upgraded mybatis to 3.5.9.
  • Upgraded jsqlparser to 4.3.
  • Added removal of Mapper related caches, supporting GroovyClassLoader dynamic Mapper injection.
  • Added hook function for dynamic table names https://github.com/baomidou/mybatis-plus/pull/3965.
  • Optimized and adjusted injection class DefaultSqlInjector.
  • Optimized reflection class ReflectionKit: field -> field changed to Function.identity().
  • baseMapper added new method exist.
  • Resolved issue where lowercase ‘from’ in Sybase caused incorrect index value retrieval.
  • Added method to get Mapper via entityClass: BaseMapper<Entity> mapper = SqlHelper.getMapper(Entity.class);.
  • Optimized byId injection method.
  • Multi-tenant right join bug https://gitee.com/baomidou/mybatis-plus/issues/I4FP6E https://github.com/baomidou/mybatis-plus/pull/4035.
  • Optimized custom injection method name https://github.com/baomidou/mybatis-plus/pull/4159.
  • Added SAP HANA in-memory database.
  • Added SimpleQuery toolbar query.
  • SQL injection validation utility class code modification.
  • Organized string constant usage.
  • Upgraded license-gradle-plugin version.
  • Optimized custom injection method name (breaking change).
  • Overloaded columnsToString method to allow subclass adjustments.
  • Fixed et judgment logic fixed gitee issues/I4L4XV.
  • Logical deletion byId supports conversion to entity deletion fill.

[v3.4.3.4] 2021.09.22

  • Handled issue where order by wrapper had conditions but no sorting.
  • Resolved compilation error when introducing cloud InetUtils class.
  • Upgraded SQL parsing dependency jsqlparser version to 4.2.
  • fix: Fixed lambda serialization failure issue after adding modularity check in JDK16.
  • fix: Java 17 support #I4A7I5.
  • bug: fix: Issue where left join condition construction added an extra one.
  • fix: Prevented full table update plugin from failing when logical deletion field default value is null.
  • Pagination count(*) as total.
  • Allowed injection of custom transaction factory TransactionFactory.

[v3.4.3.3] 2021.09.05

  • Removed ISqlParserFilter AbstractJsqlParser from utility classes; needs to be copied from older versions if used.
  • Removed global configuration workerId, datacenterId parameters; recommended to initialize identifierGenerator directly.
  • Count method Integer changed to Long, involves upgrade cost [NOTE], apologize for any inconvenience caused by this defect adjustment.
  • Fixed primary key @0rderby annotation bug.
  • Fixed String primary key deletion failure.
  • Primary key types added BigDecimal BigInteger support.
  • Isolated strong dependency on Spring framework; for non-Spring frameworks, use MP to inject GenericTypeUtils.setGenericTypeResolver.

[v3.4.3.2] 2021.08.21

  • Added support for Goldilocks database and CSIIDB database.
  • Added support for Nanda General GBase 8s database (GBASEDBT), distinct from the original definition (GBASE).
  • Optimized selectOne query method, streamlined SQL injection.
  • PropertyMapper.whenNotBlack to whenNotBlank.
  • BaseMapper added deleteById(T entity) method.
  • Upgraded jsqlparser version from 4.0 to 4.1.
  • TableInfo added native Reflector reflection operations.
  • Resolved issue where lambda constructor could not run in JDK16.
  • Wrapper clear resets sqlSegment to empty string and cache flag to true.
  • Injector adjusted not to inject ById method if no primary key.
  • Automatically construct resultMap to handle primary key to get the real field name.
  • Wrapper optimized: Optimized warnings.
  • Wrapper added gtSql, geSql, ltSql, leSql methods.
  • Added support for CUBRID database.
  • fix github pull/3557: Optimistic lock added custom exception for null version number, tenant insert ignore logic allows customization.
  • fix github issues/2931: Resolved exception when result set is larger than Integer.
  • fix github issues/3652: K8s network acquisition failure issue.
  • fix gitee issues/I3Z2RG: Optimized Order By SQL injection recognition rate.
  • fix gitee issues/3826: Optimized dynamic table name processor.
  • fix gitee issues/I3UQH5: Fixed @OrderBy annotation, exception when using limit.
  • fix github issues/3768: MySQL batch auto-increment bug.
  • Fixed primary key field mapping error when automatically constructing resultMap & OrderBySegmentList lazy loading execution.
  • Source code upgraded related test dependencies, build environment Gradle upgraded to 7.1, added more test cases.

[v3.4.3.1] 2021.06.15

  • Support multiple inheritance to obtain generics
  • pageDto changed to PageDTO as requested
  • Pagination sorting optimization
  • TableField adds ResultMapping#property annotation support
  • Fixed GitHub pull/3550, optimized sorting
  • Fix #I3T0LA
  • Open inheritance for KtUpdateChainWrapper and KtQueryChainWrapper
  • Added exists method to check if count exists
  • Optimized data dialect acquisition method to reduce object creation
  • feat: GlobalConfig adds whereStrategy property and getWhereStrategy() method to adapt selectStrategy
  • Extended p6spy optimization
  • fix GitHub#3390: SqlRunner.selectPage() method did not release connection clone
  • Optimized JDK’s default discouragement of generic arrays
  • perf: Replaced with methods inherent in JVM
  • When user specifies ID, do not auto-generate; auto-increment when not specified
  • GitHub Merge pull request #3549 #3555 #3565 #3571 #3587 #3591 #3592 #3595 #3599 #3605 #3606
  • Provided utility method for handling multi-key value retrieval from Map
  • Adjusted page annotation generic E to P for easier reading
  • Pattern defined as static constant, optimizing regex matching speed
  • Fix: @OrderBy on primary key ineffective
  • Removed addMappedStatement log printing
  • NoKeyGenerator Jdbc3KeyGenerator shared instance

[v3.4.3] 2021.05.21

  • Added HandGao database support
  • Added annotation Order By to support default sorting
  • Wrapper exists, notExists, orderBy, groupBy support parameter binding
  • Wrapper supports setParamAlias and other optimizations
  • Optimized KeyGenerator to support multiple implementations and multi-datasource injection
  • Enhanced ServiceImpl generic inference, resolving multiple inheritance and proxy issues
  • Added PageDto for microservice object transfer serialization
  • Added Page providing static of constructor method
  • Added proxy MethodHandleProxies for lambda debugging support
  • Adjusted ActiveRecord log object initialization
  • Adjusted ActiveRecord mode Model class to make pkVal method externally available
  • Removed deprecated code
  • Optimized enum value retrieval method
  • Pagination count safe handling
  • Sequence method supports override
  • Upgraded Mybatis 3.5.7
  • Fixed auto-configuration lazy-initialization no property prompt
  • Fixed MySQL on duplicate key update field name being judged as table name issue
  • Fixed lambda condition NPE exception
  • Refactored lambda information extraction method
  • Lambda information no longer serialized when retrieved
  • Merged Gitee pulls/ 141
  • Fixed GitHub issues/3208 3016
  • Fixed GitHub issues/3482: Data permission processor supports union all
  • Adjusted transaction not enabled print prompt message
  • Unit test optimization related dependency upgrades

[v3.4.2] 2021.01.15

  • fix: Removed commons utils referenced within BlockAttackInnerInterceptor
  • feat: PaginationInnerInterceptor added optimizeJoin property to control whether to optimize SQL joins during count
  • feat: Default class loader can be set via Resources.setDefaultClassLoader.
  • feat: InterceptorIgnore annotation added others property
  • feat: IService added Kotlin chain call support (ktQuery() and ktUpdate())
  • style: jsqlparser up to 4.0
  • style: Removed deprecated classes under com.baomidou.mybatisplus.extension.injector.methods.additional package
  • style: generator module moved to a separate repository generator

[v3.4.1] 2020.11.10

  • fix: New multi-tenant plugin improved subqueries, supporting comparison operators, in, EXISTS, NOT EXISTS
  • feat: Exposed AbstractWrapper.getEntityClass
  • feat: Added FakeTenantLineInnerInterceptor for TenantSqlParser transition
  • feat: Pagination count recognizes left join (subSelect) optimization
  • feat: All counts changed from count(1) to count(*)
  • style: mybatis up to 3.5.6

[v3.4.0] 2020.8.23

  • fix: When @TableName.autoResultMap=true, the built-in selectBody will not perform as, users should be aware!!!
  • feat: Added mybatis-plus-boot-starter-test module
  • fix: MetaObjectHandler overload error (solution is to swap parameter positions), fill value supports subclasses of field types on generics
  • feat: mybatis up to 3.5.5, mybatis-spring up to 2.0.5
  • feat: jsqlparser up to 3.2
  • feat: Added MybatisParameterHandler, deprecated MybatisDefaultParameterHandler
  • feat: Pagination plugin added automatic recognition support for GBase, ClickHouse, oscar, OceanBase database connections
  • feat: Wrapper added API not(boolean condition, Consumer consumer)
  • feat: Added MybatisPlusInterceptor to resolve incorrect first and second level cache issues for multi-tenant and pagination plugins
  • feat: New pagination plugin optimized to continue appending orderBy when size<0
  • feat: Added an IdentifierGenerator implementation class ImadcnIdentifierGenerator
  • fix: chainWrapper#func forced conversion exception
  • fix(mybatis-plus-generator.main): Refactored generator database type converter, fixed some branches, submitted selector tests
  • fix: Fixed issues caused by dynamic table name replacement in complex scenarios: regex changed from whitespace detection to word boundary detection
  • refactor: Refactored dynamic table name parser, removed regex replacement program, changed to replace by table name position
  • refactor: Refactored table name parsing to visitor pattern, now no changes will be made to the original SQL

[v3.3.2] 2020.5.26

  • Pagination parameter extraction, unit test case fixes
  • Dameng database code generator table filtering support
  • Microsoft database code generator table filtering support
  • Fixed code generator property field rule error
  • SelectById supports custom method names
  • Fixed pagination plugin’s issue with getting database type
  • JSON converter null value handling
  • bugfix(mybatis-plus-generator): SQL type return error issue
  • Adjusted unknown dialect exception, automatically recognize URL conversion to lowercase for matching.
  • fix: Fixed issue where an exception was not thrown when multiple fields had @TableId annotation during TableInfo initialization
  • SuperController has set method with Class parameter
  • Added method StrategyConfig.setSuperServiceImplClass(java.lang.Class<?>).
  • Code generator naming strategy adjusted.
  • Extended pagination cache key calculation.
  • Removed method inference, directly access property fields.
  • Corrected enum processor type mismatch comparison.
  • Modified table prefix matching method
  • Modified issue where pagination plugin parameters set in Mybatis global configuration file did not take effect
  • Fixed null pointer exception when parser was not specified in PR
  • Added pagination plugin limit parameter configuration
  • Fixed issue of duplicate generation of parent class fields when superEntityClass is specified
  • No need to import IdType and TableId packages when no primary key
  • Adjusted BaseResultMap generation format
  • Supports choosing whether to generate chained set in Lombok mode
  • Fixed parser for update error
  • Filtered PG constraint columns (only primary key constraints remain)
  • Added generator disable template generation
  • fix(kotlin): Fixed dynamic table name BUG, replaced table names with best effort
  • Fixed PG constraint generating duplicate property field issue
  • fix(kotlin): Changed cached key in LambdaUtils to String
  • Code generator added database keyword processing interface
  • fix github/issues/2454: Annotation inheritance supported
  • Added AES encryption for database username and password
  • Optimized method input parameter generics, supporting more types
  • Fixed code generator missing package import when is prefix removal is enabled for entity generation
  • Fixed GitHub issues/2470

[v3.3.1] 2020.1.17

  • Added TableName annotation property excludeProperty to support excluding fields
  • Added ServiceImpl#entityClass property to reduce generic extraction
  • Added Phoenix support
  • Added optional Upsert component for HBase support
  • Added generator strategy configuration enableSqlFilter property to control whether to enable SQL filter table support
  • Added batch execution methods for convenient custom batch operations
  • Wrapper supports clear
  • Wrapper subclasses added func method, mainly to support using different Wrapper methods in if-else scenarios without breaking the chain (chained calls cannot go all the way)
  • BaseMapper’s select methods with Wrapper parameters support wrapper.first to set RDS hints
  • KtUpdateWrapper#set supports null value
  • Supports generic primary key
  • Optimized pagination interceptor data type and dialect implementation class configuration
  • Second-level cache reuses count query cache
  • Some IService methods adjusted to default methods
  • Second-level cache compatible with JSON serialization (mainly when default cached count, long deserializes back to int)
  • Handled batch operation nested transaction issues (second-level cache update issues)
  • Fixed auto-fill not taking effect when updateById is used with optimistic locking enabled
  • Fixed issue where default methods (setFieldValByName and getFieldValByName) of auto-fill interface might throw exceptions in some cases
  • Fixed KtWrapper nested function issue
  • Fixed Freemarker generating Kotlin class constant errors
  • Fixed StringUtils#guessGetterName error
  • Fixed SerializationUtils resource not released issue

[v3.3.0] 2019.12.06

  • BaseMapper interface two page method optimizations
  • IService and ServiceImpl corresponding page method optimizations, some methods returning Collection changed to return List
  • Logical deletion field’s two definitions for deleted and undeleted support string "null"
  • Fixed batch operations not clearing cache
  • Batch operation exceptions converted to DataAccessException
  • mybatis up to 3.5.3, mybatis-spring up to 2.0.3, jsqlparser up to 3.1
  • Mapper optional package adjusted, chainWrapper package adjusted
  • Added ChainWrappers utility class
  • Added IdentifierGenerator interface, supporting custom ID generation
  • Code generation tool deprecated regex table name matching, added likeTable and notLikeTable
  • Pagination plugin supports custom handling of page number limits and overflow total page handling
  • Fixed SqlExplainInterceptor causing Oracle sequence to auto-increment twice
  • Pagination second-level cache support
  • Extended p6spy log printing
  • DbConfig added new property propertyFormat, TableFieldInfo removed property related
  • Optimized sequence generator, deprecated KeySequence’s clazz property
  • Fixed Ognl expression keyword causing null value judgment failure
  • Fixed update fill switch invalidation
  • Optimized fill logic
  • ISqlRunner supports selectPage
  • Supports global logical deletion field
  • BaseMapper methods can be customized
  • Added [Xugu], [Oracle12c], [Kingbase] database support
  • Resolved null as xxx issue when database field name differs from entity field name
  • Deprecated ID_WORKER_STR, automatically recognize primary key type
  • Configuration enables annotation, TableName also forced to generate

[v3.2.0] 2019.08.26

  • Code generator added Dameng database support
  • Fixed bug in multi-primary key query table field SQL
  • Added updateWrapper to attempt update, otherwise continue to execute saveOrUpdate(T) method
  • Code generator PG added numeric and instant type support
  • Fixed issue where code could not be generated if InjectionConfig did not exist
  • fix: #1386(github) Logical deletion field is Date type and non-deleted data date is null
  • Upgraded dependency mybatis version to 3.5.2
  • Upgraded dependency jsqlparser version to 2.1
  • In response to EasyScheduler’s plan to submit Apache incubation request, removed 996NPL protocol restrictions
  • Adjusted SQL to remove SET part GitHub/1460
  • Removed SqlMethod enum UPDATE_ALL_COLUMN_BY_ID property, recommended to use AlwaysUpdateSomeColumnById set
  • fix: #1412(github) github:mybatis-plus-generator can’t support oracle
  • fix: github 1380
  • Removed global configuration’s dbType and columnLike
  • Removed fieldStrategy, use the three new alternatives from the previous version
  • Removed PerformanceInterceptor related, recommended to use p6spy
  • Removed el split into jdbcType, typeHandler and other specific properties
  • Upgraded gradle-5.5.1, lombok-1.18.4
  • When selectStatement.getSelectBody() type is SetOperationList
  • Removed GlobalConfig#sqlParserCache property, removed LogicSqlInjector, OrderItem added 2 quick generation methods, page added an addOrder method with List<OrderItem> as parameter
  • Nested interface individual methods with Function<Param, Param> func as parameter, parameter changed to Consumer<Param> consumer, does not affect standard usage
  • Fixed gitee/I10XWC: Allows judging custom types based on TableField information
  • Merge pull request #1445 from kana112233/3.0
  • Supports filtering parent class properties
  • Added batch exception capture test
  • Multi-tenant ID value expression, supports multiple ID conditional queries
  • Extended to add JSON type processors: Jackson and Fastjson two implementations

[v3.1.2] 2019.06.26

  • EnumTypeHandler renamed to MybatisEnumTypeHandler, EnumAnnotationTypeHandler removed
  • Added automatic resultMap building feature, removed escape characters
  • Annotation added variable to control whether to automatically generate resultMap
  • Fixed pagination cache Key value error
  • TableField.el property marked as deprecated
  • Canceled automatic registration of MybatisMapWrapperFactory
  • Starter added default XML path scanning
  • Added MybatisPlusPropertiesCustomizer and its configuration usage
  • ConfigurationCustomizer internal method parameters updated to MybatisConfiguration
  • Original fieldStrategy marked as deprecated, added 3 new fieldStrategy types for distinction
  • Pass current mapperClass when getting injected methods
  • Added SQLite code auto-generation for test code and test database files
  • JsqlParserCountOptimize optimizes count for left join SQL more accurately
  • fix(AbstractWrapper.java): Fixed type inference error caused by lambda expressions when order or groupBy has only one condition
  • apply plugin: ‘kotlin’
  • refactor(order): Fixed sorting field priority issue (#IX1QO)
  • Cache lambdacache on startup
  • Merge pull request #1213 from sandynz/feature/sqlComment Supports SQL comments
  • Removed some wrapper variables, optimized internal string passing in wrapper
  • fix: #1160(github) Pagination component orderBy: When both group by and order by exist, and IPage parameter contains sorting properties, append
  • Merge pull request #1253 from ShammgodYoung/patch-1 Code generator input table name ignores case
  • Added pre-processing injection for rendering object MAP information
  • Modified dts rabbitAdmin bean judgment method
  • Merge pull request #1255 from ShammgodYoung/patch-2 Indented serialVersionUID property
  • JsqlParserCountOptimize added boolean field to determine whether to optimize join
  • Merge pull request #1256 from baomidou/master Master
  • Freemarker entity template indentation adjustment
  • Added jdbcType, typeHandler properties, merged el property

[v3.1.1] 2019.04.25

  • Added 996icu license agreement
  • Added mybatis-plus-dts distributed transaction rabbit reliable messaging mechanism
  • Added DynamicTableNameParser, supports dynamic table names
  • Optimized getOne log printing
  • SQL optimization skips stored procedures
  • Optimized pagination query (does not continue query if count is 0)
  • Fixed issue where pagination first-level cache could not continue paging
  • MybatisMapWrapperFactory auto-injection
  • Supports using IPage subclasses as return values under pure annotation mode
  • Logical deletion no longer requires LogicInject
  • GlobalConfig added enableSqlRunner property to control whether SqlRunner is injected, default false
  • SqlParser annotation no longer requires global parameter settings for caching, and supports annotation on mapper
  • GlobalConfig’s sqlParserCache set to deprecated
  • MyBatis upgraded to 3.5.1, mybatis-spring upgraded to 2.0.1, jsqlparser downgraded to 1.2
  • ISqlInjector interface removed injectSqlRunner method
  • SqlFormatter class set to deprecated
  • Resolved SqlCommandType confusion for auto-injected methods under logical deletion
  • Added AlwaysUpdateSomeColumnById optional component
  • SFunction inherits Function
  • DbConfig’s columnLike and dbType properties set to deprecated
  • DbConfig added schema and columnFormat properties
  • TableField annotation added keepGlobalFormat property
  • TableName annotation added schema and keepGlobalPrefix properties
  • fixed bug tmp file format error github #1048
  • Handled table/field name abstraction INameConvert interface strategy github #1038
  • DB2 supports dynamic schema configuration github #1035
  • Replaced field cache key from className to .class, which may cause: MybatisPlusException: Your property named “xxxx” cannot find the corresponding database column name! when using dev-tools (Solution: remove dev-tools)

[v3.1.0] 2019.02.24

  • Upgraded mybatis to version 3.5.0
  • Upgraded mybatis-spring to version 2.0.0
  • Upgraded jsqlparser to version 1.4
  • Added p6spy log printing support
  • Changed IService’s getOne(Wrapper<T> queryWrapper) method to throw TooManyResultsException if multiple data records are retrieved
  • Fixed custom pagination feature not supporting @select annotation
  • Fixed generator configuration swagger mode invalid in Kotlin mode
  • Fixed generator issue where fields starting with ‘is’ could not be automatically annotated
  • Fixed generator Serializable Active mode inheritance of parent class package auto-import exception
  • Fixed generator supporting automatic reading of parent class attributes for common fields
  • Fixed enum (annotation mode) converter failing to convert in stored procedures
  • Fixed beetl template logical deletion annotation error
  • Fixed issue where mapUnderscoreToCamelCase default value was not true for Configuration built via mybatis-config.xml
  • Fixed bug caused by SQL parser dynamic proxy
  • Fixed issue where retry mechanism triggered by mapper using pure annotations might cause startup errors in some cases
  • Optimized to support specifying defaultEnumTypeHandler for general enum handling
  • Optimized by copying latest code from Hibernate to SqlFormatter
  • Removed non-empty check for input parameters coll and dynamic array within wrapper’s in and notIn methods (Note: If you previously used these methods directly with potentially empty input parameters, it will now produce SQL like: in () or not in () causing errors)
  • Removed wrapper’s notInOrThrow and inOrThrow methods (Using the new in and notIn has the same effect, exceptions will be SQL exceptions)
  • Removed delete operation from IService’s query chain calls
  • Removed XML hot-loading related configurations, only MybatisMapperRefresh class remains and is marked as deprecated
  • Daily optimizations

[v3.0.7.1] 2019.01.02

  • Fixed issue where lambdaWrapper could not get primary key cache
  • Optimized IService’s new update chain call to support remove operation
  • Deprecated IService’s new query chain call delete operation
  • Daily optimizations

[v3.0.7] 2019.01.01

  • Optimized generator’s PostgreSQL database support for generating Java 8 time types
  • Optimized generator’s SQL Server database support for generating Java 8 time types
  • Optimized LambdaWrapper reflection to get field information, supporting fields with capitalized first letter
  • Optimized LambdaWrapper’s select only (supports automatic ‘as’ when fields don’t match database)
  • Optimized: when scanning BaseMapper subclasses repeatedly, only the last Configuration in TableInfo cache is retained
  • Optimized MergeSegments’ way of getting getSqlSegment
  • Optimized SQL auto-injector’s modelClass initialization process, improving initialization speed
  • Optimized BaseMapper’s update method to support null as the first parameter
  • Added 4 chain call methods to IService
  • Added beetl template to code generator
  • Added IdWorker with millisecond time ID, usable for order IDs
  • Added inOrThrow method to wrapper, throws MybatisPlusException if input parameter is empty
  • MetaObjectHandler newly provides several default methods that insert values based on annotations
  • Added lambda support under Kotlin, KtQueryWrapper and KtUpdateWrapper classes
  • Simplified MP custom SQL usage, now can use custom SQL + ${ew.customSqlSegment} method
  • Provided new InsertBatchSomeColumn optional component
  • Fixed Page’s setTotal(Long total) -> setTotal(long total)
  • Fixed Page’s setSearchCount to public
  • Fixed TenantSqlParser issue where if a where condition starts with an orExpression, directly concatenating tenant information with ‘and’ on the left side would lead to unexpected logic
  • Fixed wrapper’s lambda method passing sqlSelect downwards
  • Fixed ServiceImpl individual batch operation flushStatements issue
  • Fixed selectObjs generic type error
  • Removed InsertBatchAllColumn optional component
  • Removed transaction annotations from ServiceImpl outside of batch operations
  • Removed Model’s transaction annotations
  • Removed AbstractSqlInjector’s isInjectSqlRunner method (SqlRunner initializes earlier, isInjectSqlRunner currently cannot control it)
  • Removed MybatisSessionFactoryBuilder
  • Removed dependency on mybatis-plus-generator package, introduce it as needed
  • Restored XML hot-loading, marked as deprecated
  • Upgraded jsqlparser dependency to 1.3
  • Daily optimizations

[v3.0.6] 2018.11.18

  • Fixed WHERE X1 =? AND X2 generated when entity has more than 2 conditions and concatenates ORDER BY or GROUP BY
  • refactor(SerializedLambda.java): Refactored method to increase deserialization security, optimized naming
  • Optimized BaseMapper to support custom parent Mapper for constructing required injection methods
  • Used <where><set> instead of <trim>
  • Partial optimization: String formatting only occurs when an exception is thrown
  • Optimized IdWorker UUID generation for concurrent performance
  • feat: Dynamic pagination model, optimized pagination dialect, re-corrected DB2 pagination statement
  • Assert supports i18n multi-language error messages
  • Supports total to control whether to count SQL, added isSearchCount method
  • feat: move spring dependency from core module to extension
  • fix: Junit.assertTrue
  • Forced use of custom ParameterHandler, removed byId type restriction.
  • Added InsertBatch common method for optional components, corresponding tests, and code/performance optimizations
  • IPage new feature, generic conversion
  • Auto-fill checks if fill value is empty, skips fill logic if empty
  • Batchsize threshold changed from 30 to 1000 to improve efficiency
  • Fixed saveOrUpdate execution error in extreme cases
  • Removed MybatisSqlSessionTemplate
  • Removed XML hot-loading
  • Other optimizations

[v3.0.5] 2018.10.11

  • Removed ApiAssert, changed to Assert
  • Removed ApiResult, changed to R
  • SQL injector optimization
  • Removed excludeColumns method
  • Fixed issue where last method’s condition parameter did not take effect
  • Fixed removing 1=1 BUG
  • Removed support for spring-devtools
  • Fixed SQL concatenation error when all entity properties are null
  • Cached Class reflection information, improved efficiency
  • Entities inheriting Model class no longer need to override pkVal() method
  • Resolved mpe bug when config-location is set, and optimized initialization logic
  • Fixed logical deletion invalidation when mapper.xml exists
  • Adjusted transaction issues in ServiceImpl gitee issue/IN8T8
  • Fixed DB2 pagination dialect github issues/526

[v3.0.4] 2018.09.28

  • Corrected global configuration FieldStrategy to non-default value
  • Corrected batch transaction exception issue
  • API layer R class automatic processing logic failed
  • Modified H2 script initialization loading, removed test case injection.
  • Added other comments

[v3.0.3] 2018.09.17

  • Added method for filtering query fields
  • fixed orderBy multi-parameter bug
  • Added LogicDeleteByIdWithFill component
  • fixed github issues/476 issues/473
  • fixed github issues/360 gitee issues/IMIHN IM6GM
  • Improved allEq input parameter value to use generics
  • fixed saveOrUpdateBatch using BatchExecutor
  • fixed getOne retrieving multiple data to throw exception
  • Corrected service’s getOne method
  • Corrected some service methods to default methods
  • Fixed bug where SQL had issues when page was set with desc
  • Removed no longer needed methods
  • Resolved generator’s two optional jar issues
  • Overloaded select(Predicate predicate)
  • Other optimizations

[v3.0.2] 2018.09.11

  • Added Wrapper condition helper class
  • Added banner property to control printing
  • Fixed gitee #IMMF4: Batch insert (AR) transaction invalid
  • fix: Entity without primary key, bug in generating ew’s where condition
  • Handled SqlRunner’s sqlSession acquisition and release
  • Removed global sqlSession cache, added Model, general service layer sqlSession release
  • ext: Abstracted native enum handler class registration for easy extension
  • Optimized extensibility and others

[v3.0.1] 2018.08.31

  • Fixed code generator setting table prefix exception
  • Added EnumValue annotation-based scanning for general enum handling
  • Fixed logical deletion mixed use failure
  • DB2 dialect improvements and He Pengju optimization
  • Added test cases and others

[v3.0-RELEASE] 2018.08.28 Codename: Super Lollipop 🍭

  • Optimistic lock update(et,ew) method: et writes back version annotated field
  • Optimized and improved code generator
  • No exception thrown when package scan is empty (enums, aliases)
  • Removed SqlSession
  • Modified issue template, improved comments
  • Optimized initialization process, added logical deletion annotation count detection
  • SQL check allows skipping check
  • Supports Dameng database
  • Modified code to numeric type strict restriction, simplified API layer naming and initial value rules
  • Initialized SQL parsing moved to SqlInjector
  • Other code optimizations

[v3.0-RC3] 2018.08.19 Codename: Super Lollipop 🍭 RC3

  • Supports TableField select attribute false to exclude default injection of large field queries
  • Resolved page deserialization pages property error
  • Merged 2.x dataSource proxy handling
  • Removed DbConfig.columnUnderline property
  • Filtered out cases where selectObjs query result set is empty
  • baseMapper’s insert and update return values no longer use wrapper classes
  • fixed Gitee issues/IM3NW
  • Optimized code, improved comments, etc.

[v3.0-RC2] 2018.08.10 Codename: Super Lollipop 🍭 RC2

  • Generator added back MODULE_NAME open configuration config
  • Fixed setting - defaultEnumTypeHandler property configuration invalid
  • Compatible with Spring Boot 1.x startup.
  • Daily optimizations, test cases, optimized exception throwing process
  • Added Gitee Github issue, pull_request templates
  • Removed database keyword escaping, only supports annotation mode escaping
  • Optimized exception throwing to use assert or exceptionUtils
  • Set underscore to camel case in configuration, optimized ColumnUnderline
  • Resolved page serialization asc desc polymorphic serialization exception
  • Default dbType changed to ‘other’, dbType will only be automatically obtained if user has not configured it
  • Optimized, ColumnUnderline has the same meaning as MapUnderscoreToCamelCase
  • fixed ILY8C generator specifying IdType scenario import package
  • Added comments and a large number of new test cases

[v3.0-RC1] 2018.08.01 Codename: Super Lollipop 🍭 RC1

  • Optimized some utility class code and fixed a BUG that could cause deadlocks in a multi-threaded environment.
  • Added assertion class, and modified several places to use assertions instead of throwing exceptions.
  • Removed redundant “implements Serializable”.
  • All magic values changed to global constant mode.
  • Meimei said MP 3.0 pagination is already heavenly, no longer needing to accommodate PageHelper mode.
  • Issue #384 QueryWrapper supports excluding specified fields mode.
  • Brand new banner, brand new feel.
  • Further optimized the exception throwing process.
  • Modified the way classes are instantiated; now private classes can be instantiated.
  • Supports starting without configuration using Gitee issues/ILJQA.
  • Released sqlSession, ActiveRecord unit tests to be optimized.
  • Resolved issues with SQL generated by only calling ‘last’.
  • Fixed error when the first property of Lambda is a base class property.
  • Added generic constraints, formatted code.
  • Optimized AbstractWrapper’s usage of ISqlSegment.
  • Others

[v3.0-RC] 2018.07.23 Codename: Super Lollipop 🍭 RC

  • Optimized page to automatically adjust to list mode when size is less than 0.
  • Added Attack SQL Blocking Parser.
  • Optimized core parsing method names, added querywrapper lambda conversion parameter tests.
  • Adjusted general service layer method naming to Alibaba specification (Guinea pigs, we apologize, please scorn us! Then modify your project.).
  • Code generator allows regular expression matching for table names.
  • Optimistic lock writes back the updated version to the entity.
  • Github #385: Querying dynamic table names can utilize Wrapper.
  • Fixed Gitee issues/ILEYD.
  • Moved Page’s serialization interface to IPage interface.
  • Resolved gamma’s inability to automatically assign ID.
  • Code optimized by changing constant references.

[v3.0-gamma] 2018.07.15 Codename: Super Lollipop 🍭 Gamma

  • IPage added listMode collection mode.
  • Fixed Gitee issues/IL7W4.
  • Fixed Gitee issues/IL7W4.
  • Optimized generator package import.
  • Resolved Page ascs, descs exceptions.
  • Logical deletion cannot set a single entity parameter in the ‘where’ clause while maintaining its logic.
  • Merged PR to modify typeAliasesPackage multi-dimensional scanning.
  • Improved 3.0 test cases.
  • Code performance optimization and others.

[v3.0-beta] 2018.07.07 Codename: Super Lollipop 🍭 Beta

  • Added global configuration for field LIKE query injection, enabled by default (true).
  • Modified CONCAT method for Oracle and DB2 dbtypes.
  • Corrected that regardless of how the updateWrapper parameter for update changes, logical deletion still has restrictions.
  • Added warnings to comments, improved comments.
  • Fixed GitHub issues/377, 378, 389.
  • Resolved logical deletion coexisting with non-logical deletion logic.
  • Logical deletion supports ‘delete set other fields’ and ‘update excluding logical deletion fields’.
  • Supports multiple typeAliasesPackage entries, each with wildcards, e.g., com.a.b..po, com.c..po.
  • Fixed Gitee issues/IKJ48, IL0B2.
  • Other improvements.

[v3.0-alpha] 2018.07.01 Codename: Super Lollipop 🍭

  • Upgraded to JDK 8+ and optimized performance; Wrapper supports lambda syntax.
  • Modularized MP with reasonable distribution of package structures.
  • Refactored injection methods to support simplified injection mode for any method.
  • Global configuration for underscore conversion eliminates AS statement injection.
  • Refactored Wrapper to QueryWrapper and UpdateWrapper.
  • Refactored pagination plugin to eliminate fixed pagination models, supporting Mapper to directly return IPage interface.
  • Added Rest API via Controller layer.
  • Entity String type fields default to LIKE queries; SelectOne defaults to LIMIT 1.
  • Assisted selectMaps by adding a bean-map conversion utility class.
  • Added DB2 support; starter changed to Spring Boot 2+ support.
  • Refactored generator to provide custom DB and multiple template engine support.
  • Related BUG fixes.

[v2.1.9] 2018.01.28 Codename: Nostalgia (Commemorating the shared growth journey of baomidou team members with MP in 2017, heading towards a prosperous 2018)

  • Page pagination added control for whether to optimize Count SQL.
// Do not optimize count sql
page.setOptimizeCountSql(false);
  • Injection definition filling, supports SQL injector, primary key generator.
  • Fixed GitHub issues/231.
  • Fixed GitHub issues/234.
  • Modified logical deletion selectByIds collection issue.
  • Fixed Gitee issues/IHF7N.
  • Fixed Gitee issues/IHH83.
  • Compatible configuration method, prioritizing custom injection.
  • Other optimizations.

[v2.1.9-SNAPSHOT] 2018.01.16

  • Adjusted Gradle dependency mode.
  • IdType optional ID_WORKER_STR String type IdWorker.getIdStr() String type.
  • TableField annotation added update attribute for pre-processing set field custom injection, fixed Gitee IHART.
For example: @TableField(.. , update="%s+1") where %s will be filled with the field
Output SQL: update table set field=field+1 where ...
For example: @TableField(.. , update="now()") uses database time
Output SQL: update table set field=now() where ...
  • TableField annotation added condition attribute for pre-processing WHERE entity condition custom operation rules.
@TableField(condition = SqlCondition.LIKE)
private String name;
Output SQL: select table where name LIKE CONCAT('%',value,'%')
  • Added spring-boot-starter module with built-in jdbc mp package, no separate import needed for more comfortable Boot usage.
  • Added support for SQL Server view generation.
  • Allows independent field strategy setting, defaults to naming strategy.
strategy.setNaming(NamingStrategy.underline_to_camel);// Table name generation strategy
strategy.setColumnNaming(NamingStrategy.underline_to_camel);// Allows independent field strategy setting, defaults to naming strategy
  • Code generator abstracts AbstractTemplateEngine template engine abstract class, allowing custom template engines, added built-in Freemarker option.
// Select Freemarker engine
mpg.setTemplateEngine(new FreemarkerTemplateEngine());
  • Related SQL parsing, such as multi-tenancy, can exclude SQL parsing via @SqlParser(filter=true).
# Enable SQL parsing cache annotation to take effect
mybatis-plus:
global-config:
sql-parser-cache: true
  • Resolved XML loading order issue, allowing arbitrary inclusion of other XML SQL fragments.
  • Fixed bug where author had 123.
  • Fix #IGQGE: Wrapper is null, but page.getCondition() is not null, Condition cannot be passed issue.
  • Fix #IH6ED: Pagination Dubbo sorting and other attribute serialization not supported.
  • Check if Wrapper is null using ==, to avoid influence of equals method overload.
  • Avoid injecting custom base classes.
  • Separated SQL and moved it to SqlUtils.
  • Unified indentation coding style.
  • Optimized generated code execution performance, GitHub issues/219.
  • Optimized SQL parsing process.
  • Fixed Gitee issues/IHCQB.
  • Modified springboot-configuration-processor compileOnly to optional.
  • Others.

[v2.1.8] 2018.01.02 Codename: 囍

  • Fixed bug caused by field prefix in code generator.
  • Used full class names instead of manually written full names.
  • Build modifications.
  • Script warnings, ignored directories.
  • Other optimizations.

[v2.1.8-SNAPSHOT] 2017.12.28 Codename: Mola Mola (Named by Qiuqiu)

  • Returned Map automatically converts underscores to camelCase.
  • Kotlin entity static constant support.
  • Optimized pagination construction mode.
  • Merged pull request #201.
  • Fix: selectByMap @alexqdjay.
  • Added sqlRunner test cases, fixed bug where selectObjs only retrieved one field.
  • Added BlobTypeHandler.
  • Removed initial size configuration for parameter map.
  • Added .editorconfig, fixed template space issues.
  • HikariCP connection pool unable to print SQL.
  • Removed paths from global configuration; mapperLocations are now indispensable.
  • K God: All test cases covered.

[v2.1.7] 2017.12.11 Codename: Gentle Breeze, this version has a bug, please change to 2.1.8-SNAPSHOT +

  • Enum handling: primitive types, Number types, String types.
  • IGDRW: Source code comment error, easily misleading. Comment error issue.
  • Cannon fodder PR !42: Added pagination constructor overload. Added pagination constructor overload.
  • Code generation > Oracle > Resolved issue of exceeding maximum cursor.
  • Fixed Gitee IGNL9.
  • K God: A large wave of test cases incoming.
  • Used transient keyword to remove some fields from Page from participating in serialization.
  • Removed invalid logs.
  • Fix #IGI3H: selectBatchIds parameter changed to Collection type.
  • Bugfix for logic delete SQL injector.
  • Added support for multiple sorting fields.
  • Fixed GitHub #185: 2.0.2 version auto-increment primary key batch insert issue PR.
  • Other optimizations.

[v2.1.6] 2017.11.22 Codename: Little Qiuqiu’s Kiss

  • Modules split into support, core, generate; code generation separated for optional dependency.
  • Resolved Gitee issue IFX30 by splitting mybatis-plus-support package support.
  • Resolved Gitee issue IGAPX for common enum BigDecimal type mapping.
  • Druid supplement, fill field modification.
  • Fixed some logic bugs in Kotlin code generation.
  • Merged Gitee PR 40: updateAllColumn**** and other methods exclude fields annotated with fill = FieldFill.INSERT. Thanks to Elsif.
  • Constructor mode setting Kotlin modification.
  • SQL utility class reflection instance optimization.
  • Other optimizations.

[v2.1.5] 2017.11.11 Codename: Li Shen

  • Common enum Spring Boot compatibility adjustments.
  • PostgreSQL supports keyword/non-keyword conversion issues.
  • Cat73 PR: Slightly adjusted auto-generated code.
  • Supports Kotlin code generation.
  • Bugfix for metaObj handler set val which not included in …
  • Alibaba specification adjustments.
  • Others.

[v2.1.3 - 2.1.4] 2017.10.15

  • Added common enum processor, refer to Spring Boot demo.
  • Optimized SQL parser.
  • Added schema tenant parser (to be improved).
  • Other optimizations.

[v2.1.2] 2017.09.17 Codename: X

  • Fixed code generator bug.
  • Fixed Gitee issues/IF2DY.
  • Modified page to support chained operations.
  • Removed Oracle escaping.
  • Fixed GitHub issues/119.
  • Fixed Gitee issues/IF2OI.

[v2.1.1] 2017.09.12 Codename: Little Pot Lid

  • Fixed pagination bug where it automatically sets to the first page when exceeding total records. Thanks to @wujing for the PR.
  • Fixed IEID6.
  • Upgraded MyBatis 3.4.5.
  • Upgraded generator template engine Velocity 2.0.
  • Upgraded jsqlparser 1.1.
  • Added SQL parsing chain for dynamic extension of custom SQL parsing.
  • Added multi-tenant SQL parsing logic, see Spring Boot demo for details.
  • jasonlong10 PR: Performance analysis interceptor supports printing SQL for OraclePreparedStatementWrapper.
  • Fixed GitHub issues/145.
  • Fixed Gitee issue/IF1OF.
  • Added sqlSelect(“distinct test_type”) test case.
  • Added missing TableField import class for fill generator.
  • Fixed GitHub issues/MySQL table name contains reserved words, code generation error #124: All uppercase fields with underscore naming supported.
  • Fixed GitHub issues/134.
  • PostgreSQL code generation supports specifying schema table fields by default order.
  • Other optimizations and adjustments.

[v2.1.0] 2017.08.01 Codename: Little Qiuqiu

Main Features

  • Fixed issue where batch sqlSession was not closed.
  • Handled SQL formatting error issue, added fill information.
  • #91: Optimized insertBatch for large data volumes (GitHub).
  • Added UUID primary key test cases.
  • Fixed BUG where auto-fill would overwrite previous values.
  • Upgraded POM dependencies, spring-test scope set to test.
  • Changed SQL Server driver, removed unnecessary string type tests for optimistic lock.
  • #86: Regarding Plus’s underlying mapping design issue (GitHub issue).
  • SqlHelper handles cases where Wrapper is null but page.getCondition() is not null.
  • Merged pull request !33: Added field sorting to generated entities from Lao Qian/master.
  • Resolved issue where using proxy objects prevented obtaining instance cache information.
  • Resolved issue where SQL generation for boolean types starting with ‘is’ was incorrect.
  • DBType setting error.
  • Fix #351: DB2Dialect returns NULL.
  • Fix #356: Auto-generated Boolean type getter method is incorrect.
  • Fix #353: Code generation @TableLogic issue.
  • Added PostgreSqlInjector auto-injector, handles case-sensitive fields and automatic double-quote escaping.
  • Repository address and user information use custom input.
  • Fix #357: Code generation @TableLogic package import Bug.
  • Sequence added MAC judgment, pagination PageHelper mode added freeTotal() method.
  • #95: Two suggestions for pagination plugin (GitHub), selectItems contains #{} ${}.
  • Added Wrapper#setSqlSelect(String… columns) method, convenient for automatically generated entities…
  • Fixed GitHub 116 issue.
  • Fixed OSGiT IE436, IDVPZ, IDTZH.

Code Generation

  • Modified entity generation template.
  • Fixed auto-fill code generation error.
  • Added PostgreSQL schema name generator support.
  • Adjusted serialization import issues.
  • Others.

[v2.1-gamma] 2017.06.29

Main Features

  • Corrected previous SQL Server automatic type acquisition error.
  • Fixed issue where users could not customize pagination database dialect.

Code Generation

  • Improved auto-fill code generation.
  • Fixed PostgreSQL generating duplicate fields issue.

Issues caused by upgrading from the previous version (2.0.9)

  • Fixed issue where entity primary key could not be read if not in the first position.
  • Fixed Insert not found et exception when performing custom insert operations, see #331.
  • Fixed SQL generation error (normal injection Group, Having, Order).
  • Fixed logical deletion SQL generation order error.
  • Thanks to all partners for timely feedback on issues. We deeply apologize for the problems caused by the previous version.

Mybatis-Plus-Boot-Start [1.0.4]

Main Changes

  • Removed direct MyBatis-Plus dependency.
  • Removed direct Spring Boot jdbc-starter dependency.

[v2.0.9] 2017.06.26 Codename: K-God

###MyBatis-Plus ####Core Features

  • Fixed optimistic lock and logical deletion conflict issue.
  • Addressed the issue where the existence and enabled underscore configuration were not considered when generating injected SQL.
  • Fixed EntityWrapper inheritance issue.
  • Added conditional judgment to Wrapper.
  • Performance analysis plugin supports logging prompts.
  • Wrapper overrides toString method, resolving the misconception caused by null display during debugging.
  • Addressed the issue of frequent even numbers in Sequence concurrency within milliseconds.
  • Optimized ignore strategy handling, changed annotation attributes.
  • Optimized SQL injection method, removed previous XML injection method.
  • Addressed the issue of two WHERE clauses appearing in logical deletion.
  • Added implementation methods for other database sequences, and exposed interfaces for user extension.
  • Optimized and adjusted optimistic lock.
  • Optimized WHERE AND OR in Wrapper, removed previous reflection-based implementation to improve code execution efficiency.
  • Addressed the issue where primary keys could not be populated without adding mybatis-config.xml.
  • MyBatis-Plus added support for Gradle build method.
  • Wrapper added and() or() methods.
  • Optimized GlobalConfiguration, extracted GlobalConfigUtils to reduce coupling.
  • Fixed pagination issues with SQL Server 2008 and SQL Server 2005.
  • Added automatic database recognition, reducing explicit user configuration.
  • Optimized pagination plugin to reduce explicit user configuration properties.
  • Resolved auto-fill field issue.
  • Added PageHelper, using current thread to manage pagination (old users are advised not to use this, this method is only suitable for users accustomed to MybatisPageHelper).
  • Significantly added test cases (thanks to K-God for support).
  • Other code optimizations.
  • After adding JSqlparser dependency, no need to manually add the Jar package.

####Code Generation

  • Supported logical deletion generation.
  • Supported optimistic lock generation.
  • Fixed the issue where the generator could not recognize SQL Server auto-increment primary keys.
  • Supported Lombok generation.
  • Supported builder pattern generation.
  • Added Clob and Blob type conversion.
  • Fixed Oracle Number type field conversion error.

###MyBatis-Plus-Boot-Start [1.0.2] Codename: Breeze ####Core Features

  • Addressed the issue where devtool replacing data source in AR mode failed.
  • Added logical deletion support.
  • Added sequence support.

[v2.0.8] 2017.05.15

  • Wrapper added sqlSelect object setting.
  • Compatible with no annotation scenarios.
  • Optimistic lock removed default short implementation, optimized binding of registry during scanning phase. Tests changed to H2 environment.
  • Optimized hot loading, removed mapper path configuration.
  • Reduced Mapper configuration refresh.
  • Fixed tableField value being empty when underscore naming is enabled.
  • Sequence upgrade prompt.
  • Exposed table information, reserved for subclass overriding.
  • Modified IdWorker test.
  • Supported devtools.
  • Fixed 259: Supported XML resultMap common field generation.
  • Fixed pulls 28: Supported property overloading.

[v2.0.6 2.0.7] 2017.04.20

  • Added logical deletion.
  • Added Oracle Sequence.
  • Added JDK 1.8 time types.
  • Improved optimistic lock support.
  • Improved field filler, supported update filling.
  • Upgraded MyBatis dependency to 3.4.4.
  • Code adjustments and optimizations, supported Wrapper limit and other logic.
  • Fixed ID strategy auto bug, generator bugs, and others.

[v2.0.5] 2017.03.25

  • Fixed bug where pagination connection pool was not closed.
  • Issues fixed 217.
  • Fixed bug where IMetaObjectHandler was ineffective when primary key type was AUTO or INPUT.
  • Fixed LIKE placeholder issue.
  • Created new directory if it didn’t exist during code generation.

[v2.0.3 - v2.0.4] 2017.03.22

  • Optimized Wrapper code structure.
  • Optimized existing database connection acquisition.
  • Resolved Page initialization issue (previously only effective via constructor, now also effective via setters/getters).
  • Supported optimistic lock plugin.
  • Refactored Wrapper to let JDBC layer handle parameters, better integrating with PreparedStatement.
  • Fixed related error log prompt levels.
  • Wrapper exposed isWhere method, now allows customizing whether to append “WHERE”.
  • JDK version backward compatibility, previous code used JDK 1.7 new features, now removed.
  • SQL Server generation bug fixes and code optimization.
  • Optimized MyBatis-Plus, SqlSession acquisition.
  • Resolved issues where SqlSession obtained without AOP configuration did not belong to the current transaction, and transaction issues caused by multiple SqlSessions.
  • Enhanced SQL execution class, SqlRunner.
  • Model added serialization ID, to prevent serialization ID changes when not set after modifying the Model.
  • Added test cases for overriding default BaseMapper.
  • Thanks to all contributors for their good suggestions and code contributions, no individual mentions.

[v2.0.2] 2017.02.13

  • Fixed global configuration not working (2.0.1 logic).
  • Removed forced type configuration for byId.
  • Optimized Wrapper, Page, and other programs.
  • Optimized AR mode to automatically close database connections (previously required manual transaction setup).
  • Optimized code generator: underscore name annotations do not process camel case, supports more custom templates like JSP, HTML, etc.
  • Added service layer tests.
  • SQL logging integrated into performance analysis plugin.
  • Addressed multi-datasource pagination plugin supporting multiple databases.

[v2.0.1] 2017.01.15

  • Resolved EntityWrapper constructing incorrect SQL for boolean types.
  • Adjusted global configuration initialization log prompts.
  • Upgraded MyBatis dependency to 3.4.2, MyBatis-Spring dependency to 1.3.1.
  • Added methods to Service (selectObjs, selectMaps).
  • Resolved selectCount throwing error when database returns null.
  • Supported PostgreSQL code generation.
  • Extended support for external provision of escape characters and keyword lists.
  • Exposed database tables without primary keys to still inject MP’s CRUD (MP’s xxById methods cannot be used without primary keys).
  • Resolved issue where EntityWrapper’s OR method did not work on first call when concatenating SQL.
  • SQL Server code generation (based on 2008 version).
  • Resolved issue of BigDecimal not being imported during code generation.
  • Released database connections when automatically reading from the database.
  • Optimized global validation mechanism (mechanism for EMPTY now ignores Date types).
  • Optimized injection, avoided scanning BaseMapper.
  • Optimized injection, removed redundant injection methods.
  • Renamed SQLlikeType to SqlLike.
  • Resolved hot loading associated query error.
  • Renamed SqlQuery to SqlRunner.
  • Optimized and improved code generator.
  • Fixed code generator not importing @TableName.
  • Global configuration previously required manual addition of MP’s default injection classes, changed to automatic injection for simplified configuration.
  • Wrapper added ne method.
  • Fixed MyBatis dynamic parameters unable to generate totalCount issue.
  • Optimized code structure, optimized generator templates.
  • Resolved issues [138, 140, 142, 148, 151, 152, 153, 156, 157], for details, please refer to all issues in milestone mybatis-plus 2.0.1 plan.

[v2.0.0] 2016.12.11

  • Supported global uppercase naming strategy.
  • Optimized automatic pagination Count statement.
  • Optimized existing global configuration strategy.
  • Optimized global validation strategy.
  • Optimized code generator (previously hardcoded, now uses template form).
  • Optimized injection of common ByMap method logic.
  • Added automatic database type selection.
  • Improved SqlExplainInterceptor (automatically determines if MySQL version does not support this interceptor and bypasses it if version is too low, i.e., less than 5.6.3).
  • Fixed issue where some special characters were escaped multiple times.
  • Optimized existing EntityWrapper by adding Wrapper parent class and Condition chain queries.
  • Wrapper class made LIKE method compatible with multiple databases.
  • Optimized logging to use native MyBatis’s own log output prompts.
  • Fixed issue where using cache prevented Count value calculation with pagination.
  • Fixed PerformanceInterceptor replacing ? causing inaccurate SQL printing, and added formatted SQL option.
  • Added support for multiple databases, please refer to DBType.
  • Added non-null validation strategy for string type fields (string types automatically determine non-null and non-empty strings).
  • Wrapper added QBC-like queries (eq, gt, lt, etc.).
  • Supported AR mode (requires inheriting from Model).
  • Merged all Selective common methods (e.g., removed previous insert method and renamed previous insertSelective to insert).
  • Resolved issue where SQL stripper would remove --.
  • Supported MySQL keywords, automatic escaping.
  • Streamlined underlying Service and Mapper inheritance structure.
  • Good news for those who dislike writing SQL in XML: added SQL execution method, please refer to SqlQuery for details.
  • Optimized code structure.
  • Resolved issues [95, 96, 98, 100, 103, 104, 108, 114, 119, 121, 123, 124, 125, 126, 127, 128, 131, 133, 134, 135], for details, please refer to all issues in milestone mybatis-plus 2.0 plan.

[v1.4.9] 2016.10.28

  • ServiceImpl removed @Transactional annotation, removed Slf4j dependency.
  • Resolved SQL injection issue when using EntityWrapper for queries with special characters as parameters.
  • Adjusted MyBatis camel case configuration order: MyBatis-Plus > MyBatis.
  • Optimized pagination plugin and fixed issue where pagination overflow setting was ineffective.
  • Removed DBKeywordsProcessor, added MySQL automatic keyword escaping.
  • Code generator added support for TEXT, TIME, TIMESTAMP type generation.
  • Added batch insert method.
  • Code generator added Controller layer code generation.
  • Adjusted some List parameters in EntityWrapper class to Collection.
  • Code generator optimized to support resultMap.

[v1.4.8] 2016.10.12

  • insertOrUpdate added primary key empty string check.
  • Supported MyBatis native camel case configuration mapUnderscoreToCamelCase switch setting.
  • Supported TableField FieldStrategy annotation global configuration.
  • SelectOne, SelectCount methods supported EntityWrapper approach.
  • Oracle code generator supported Integer, Long, Double type differentiation.
  • Fixed INPUT primary key strategy InsertOrUpdate method bug.
  • EntityWrapper IN added varargs support.
  • Base Mapper, Service common method PK parameter type changed to Serializable.
  • Added warning prompt when selectOne result set is not unique (requires enabling log warn mode).
  • BaseService added logger, subclasses can directly call logger without redefinition (requires slf4j dependency).

[v1.4.7] 2016.09.27

  • Primary key annotation I changed to PK for better understanding, removed mapper annotation.
  • Performance analysis plugin, special handling for $ content.
  • Added auto-commit transaction explanation, added new transaction tests.
  • Supported resultMap entity result set mapping.
  • Added #TableField(el = "") expression: when the field is an object, #{object.property} can be used to map to the database table, and for testing.
  • Added typeHandler cascade query support.
  • Added validation field strategy enum class.
  • Code generator supported entity builder model setting.
  • Code generator added entity constant generation support.
  • CRUD added insertOrUpdate method.
  • Resolved MessageFormat.format formatting numeric SQL errors.
  • EntityWrapper added EXISTS, IN, BETWEEN AND method support (thanks to D.Yang for suggesting).
  • Supported MySQL 5.7+ JSON enum types, code generation.
  • Supported injecting CRUD methods without XML.
  • Modified MyBatis native configuration file loading order.

[v1.4.6] 2016.09.05

  • Added skipping SQL injection for entities without @TableId annotation.
  • Supported non-table mapped object insertion without performing filling.
  • xxxByMap supported null queries.

[v1.4.5] 2016.08.28

  • Added XML modification automatic hot loading feature.
  • Added automatic handling of MessageFormat parameters of type String in EntityWrapper methods.
  • Added automatic filling feature for common table fields.

[v1.4.4] 2016.08.25

  • All conditional methods in EntityWrapper support passing null parameters; such conditions will not be appended to the SQL statement.
  • Renamed TSQLPlus to TSqlPlus to maintain consistent naming.
  • Fixed MySQL keyword bug: added “ to keyword mappings, and allowed custom file extensions during XML file generation.
  • Added non-null check before closing resources to avoid NullPointerExceptions caused by incorrect SQL, and added current > pages check for selection.
  • TSQL related classes implemented serialization to support Dubbo.
  • Added MyBatis automatic hot loading plugin.
  • Supported database ORDER BY and other keyword escaping for CRUD operations.

[v1.4.3] 2016.08.23

  • Optimized Sequence to be compatible with cases where MAC address cannot be obtained.
  • Compatible with user setting empty string for ID, auto-fill.
  • Pure uppercase naming converted to lowercase properties.
  • Modified EntityWrapper to encapsulate methods based on T-SQL syntax standards.
  • Upgraded 1.4.3 test transitive dependencies.

[v1.4.0] 2016.08.17

  • Added custom select result set, optimized page pagination.
  • Functions not considered, removed field optimization.
  • Added interceptor to prohibit DELETE and UPDATE full table operations.

[v1.3.9] 2016.08.09

  • Fixed bug.
  • Resolved insert map exception.
  • Insert map not processed, returned as is.
  • Optimized IdWorker generator.
  • Supported custom LanguageDriver.
  • Supported custom class names for code generation.
  • Upgraded MyBatis 3.4.1 dependency.

[v1.3.6] 2016.07.28

  • Supported global table field underscore naming setting.
  • Added custom SQL injection method.
  • Optimized pagination logic: list query not executed if total records are 0.
  • Automatically generated XML base fields added AS handling.
  • Supported field subqueries.

[v1.3.5] 2016.07.24

  • Upgraded 1.3.5 to support global table field underscore naming setting.
  • Added exception throwing when multiple primary key annotations are found.
  • Added startup exception for no primary key.
  • Removed reset getDefaultScriptingLanguageInstance.
  • Modified ambiguous overloaded methods.

[v1.3.3] 2016.07.15

  • Addressed SimpleDateFormat non-thread-safe issue.
  • Fixed Oracle pagination bug.
  • Fixed Oracle TIMESTAMP generation support bug.

[v1.3.2] 2016.07.12

  • Service exposed sqlSegment method calls.
  • Added SQL execution performance analysis plugins.
  • Added deleteByMap, selectByMap.

[v1.3.0] 2016.07.07

  • Supported LIKE comparison and other query sqlSegment implementations.
  • Supported typeAliasesPackage wildcard scanning, pagination query without count.
  • MyBatis mapper method call execution principle test.
  • Added IOC demo use case.

[v1.2.17] 2016.06.15

  • Optimized code generator, thanks to yanghu for the pull request.
  • Adjusted SQL loading order: xmlSql > curdSql.
  • Supported CRUD second-level cache.
  • Added cache tests and special character tests.

[v1.2.15] 2016.04.27

  • Added support for Oracle automatic code generation, testing features.
  • Added UUID strategy.
  • Demo: click spring-wind.
  • Added support for single table count query.

[v1.2.12] 2016.04.22

  • Added service layer support for generic ID, optimized auto-generated code.
  • Upgraded MyBatis to 3.4.0, MyBatis-Spring to 1.3.0.

[v1.2.11] 2016.04.18

  • Added batch update, supported Oracle batch operations.
  • Removed, documentation migrated to spring-wind.
  • Supported JDK 1.5, modified param description.
  • Added database types.

[v1.2.9] 2016.04.10

  • EntityWrapper added constructor without ORDER BY.
  • MailHelper overloaded sendMail method.
  • Added String primary key ID support for CommonMapper.
  • Original selectList method separated into selectList and selectPage methods.
  • Optimized code generator, added documentation, and others.

[v1.2.8] 2016.04.02

  • Optimized code generation to handle uppercase fields, supported automatic generation of entity, mapper, and service files.
  • Optimized pagination index out-of-bounds logic, added 5 new CRUD operation methods.
  • Exposed template engine getHtmltext method.
  • Optimized email sending configuration, added documentation.
  • Added documentation, and others.

[v1.2.6] 2016.03.29

  • Optimized service layer encapsulation, extracted list and page methods.
  • Optimized pagination count SQL statement.
  • Improved mail utility class.
  • Improved framework support for Spring framework.
  • Added documentation, and others.

[v1.2.5] 2016.03.25

  • Independent baseMapper supporting generic IDs.
  • More complete auto-generation tool.
  • Supported entity encapsulation sorting.
  • Pagination plugin improved.
  • Extracted service primary key generic support.

[v1.2.2] 2016.03.14

  • Annotation ID distinguishes AUTO (database auto-increment), ID_WORKER (auto-fill custom auto-increment ID), INPUT (manual input).
  • Optimized code and auto-generator features.
  • Others.
Baomidou

© 2016-2025 Baomidou™. All Rights Reserved.

Power by Astro Starlight | Sponsored by JetBrains

渝ICP备2021000141号-1 | 渝公网安备50011302222097