Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 17:28
· 50 commits to main since this release

The query side: read models that are refreshed from the write model and can be rebuilt, and row-level data scope on top of multi-tenancy. ddk-mall uses the first for order search.

Added

  • ddk-mall searches orders through a read model built on ddk-projection-starter: a wide table refreshed after each order change, rebuildable through an endpoint, and exposed as the search_orders MCP tool
  • ddk-projection-starter: read models that follow the write model. Projections.markDirty(name, id) records a changed entry in the caller's transaction; after the commit a Projection bean regenerates that entry from the current state of the write model. Failures are retried with a growing delay, repeated marks are coalesced, a change during a refresh is never lost, and Projections.rebuild(name) refreshes everything. Works on MySQL, PostgreSQL and H2
  • Row-level data scope in ddk-mybatis-starter (ddk.mybatis.data-scope.*): queries, updates and deletes on the listed tables are narrowed to what the current operator may see, by group column (dept_id), by creator column (create_by), or both. The application answers one question through a DataScopeResolver bean: what is this operator's DataScope. Like multi-tenancy it fails closed: a statement on a scoped table without an operator throws. Off by default

Changed

  • MybatisPlusAutoConfiguration.mybatisPlusInterceptor takes an additional ObjectProvider<DataScopeResolver>. It is a bean method that Spring calls; code that invoked it directly needs the extra argument