Results 488 comments of Liuzh

执行的时机过早导致的,可以试试lazy能不能行,如果不行,就把这部分方法单独提供,不用通用方法。

>useSqlserver2012(sqlserver):使用 SqlServer2012 数据库时,需要手动指定为 sqlserver2012,否则会使用 SqlServer2005 的方式进行分页,还可以设置 useSqlserver2012=true将2012改为sqlserver的默认方式。 修改不复杂,可以考虑改默认方言。

除了 pr#https://github.com/pagehelper/pagehelper-spring-boot/pull/177 还要改哪些?

支持运行时动态指定使用的 dialect 实现,例如 `PageHelper.startPage(1, 10).using("oracle");` 或者 `PageHelper.startPage(2, 10).using("org.exmaple.CustomDialect");`

文档: https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/HowToUse.md 下面几个参数都是针对默认 dialect 情况下的参数。使用自定义 dialect 实现时,下面的参数没有任何作用。 helperDialect:分页插件会自动检测当前的数据库链接,自动选择合适的分页方式。 你可以配置helperDialect属性来指定分页插件使用哪种方言。配置时,可以使用下面的缩写值: oracle,mysql,mariadb,sqlite,hsqldb,postgresql,db2,sqlserver,informix,h2,sqlserver2012,derby (完整内容看 [PageAutoDialect](https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/src/main/java/com/github/pagehelper/page/PageAutoDialect.java)) 特别注意:使用 SqlServer2012 数据库时,需要手动指定为 sqlserver2012,否则会使用 SqlServer2005 的方式进行分页,还可以设置 useSqlserver2012=true 将2012改为sqlserver的默认方式。 你也可以实现 AbstractHelperDialect,然后配置该属性为实现类的全限定名称即可使用自定义的实现方法。 dialectAlias:允许配置自定义实现的 别名,可以用于根据 JDBCURL 自动获取对应实现,允许通过此种方式覆盖已有的实现,配置示例如(多个时分号隔开): 当你使用的 jdbcurl 不在 [PageAutoDialect](https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/src/main/java/com/github/pagehelper/page/PageAutoDialect.java)...

能否在当前项目加个单元测试复现问题?

5.0完全copy官方starter进行了更新,可以看看官方文档这部分配置: https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/zh/index.html ![image](https://github.com/user-attachments/assets/9c7a616b-6632-4c2b-83b4-a1646ad5f8c0)

除了mybatis.config 还有没有其他不兼容的配置?

@ljfreedom 参考官方文档能不能解决? https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/zh/index.html

用这个方法:https://github.com/abel533/Mapper/blob/master/extra/src/main/java/tk/mybatis/mapper/additional/update/force/UpdateByPrimaryKeySelectiveForceMapper.java