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.
将 BaseTable 的 asExpression 为 open, 如此 BaseTable 可以通过重写 asExpression 方法在 extraProperties 放入一些信息.
在自定义实现的 Dialect 中实现一些操作, 例如: 逻辑删除, 更新/新增时的自动填充
详细可以参考这个仓库 逻辑删除, 自动填充
一个逻辑删除的案例:
定义一个 BaseTable 的基类集成自 Table
实现一个 LogicalVisitorInterceptor 为 依据 extraProperties 中保存的信息构建查询条件
省略一些代码, 详情的看这个 仓库
最后效果
定义如下 Entity
DSL api
sequence Api