You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/02/24 07:59:10 UTC
[GitHub] [dolphinscheduler] caishunfeng commented on a change in pull request #8515: upgrade mybatis-plus to 3.4.3
caishunfeng commented on a change in pull request #8515:
URL: https://github.com/apache/dolphinscheduler/pull/8515#discussion_r813628041
##########
File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/datasource/SpringConnectionFactory.java
##########
@@ -58,12 +56,16 @@ public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Excepti
configuration.setCacheEnabled(false);
configuration.setCallSettersOnNulls(true);
configuration.setJdbcTypeForNull(JdbcType.NULL);
- configuration.addInterceptor(paginationInterceptor());
+ configuration.setObjectWrapperFactory(new MybatisMapWrapperFactory());
+
+ MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
+ mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
+ mybatisPlusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
Review comment:
Does it need to add this optimistic lock plugin? This plugin requires the object to have a @version field to take effect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org