fix: 修复配置转换、SQL 方言与 JEXL 配置失效#711
Open
zhibeigg wants to merge 1 commit into
Open
Conversation
保留声明集合语义并按数据库方言生成合法 SQL,同时确保 JEXL 配置变更后重建引擎。
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原有问题
配置转换、SQL 构造和 JEXL 引擎缓存都存在“表面类型或配置已变化,内部仍按旧信息处理”的问题:
ObjectConverter在递归转换集合和映射时丢失声明泛型,嵌套对象可能按原始Object、错误集合类型或错误元素类型恢复。ActionInsert在 MySQL、PostgreSQL、SQLite 间复用不兼容的 upsert 语法,空字段、占位符和参数顺序也可能不一致。典型触发场景与后果
List<Map<String, Bean>>、Set、Queue、SortedSet 或 EnumSet:读取后出现ClassCastException、元素类型错误或集合语义丢失。本 PR 修改
修改目的
让配置声明、数据库方言和运行时脚本配置真正决定最终行为,避免类型漂移、SQL 在不同数据库上失效以及配置修改不生效。
兼容性与行为变化
验证
./gradlew :module:basic:basic-configuration:test :module:database:test :module:script:script-jexl:test --rerun-tasks --no-parallel --stacktrace./gradlew :module:script:script-jexl:test :module:script:script-jexl:shadowJar --rerun-tasks --no-parallel --stacktracegit diff --checkRefs #703