Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

intent: calculatedForCreate runs no calculated actions - create-time checks and duplicate warnings miss every action-derived field

未关闭
#8,000 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
54/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java
领域
backend, testing

调研方向

Start by reading the generated repository implementation of calculatedForCreate and calculatedForUpdate, then trace how save() applies calculatedActionOnCreate and calculatedActionOnUpdate. Add an integration test for an action-derived field covered by duplicate or requiredWhen; it should verify that omitting the field produces the same check result as submitting it. Done when create and update checks see the values that will be stored.

由索引模型根据 Issue 内容生成。

描述

What happens

The generated controller runs a record's checks: (including the soft duplicate warn tier) on repository.calculatedForCreate(entity), the "record this create would store". For an entity whose fields are derived by calculatedActionOnCreate, that copy is the SUBMITTED record unchanged: the generated calculatedForCreate returns submitted (seen on 14.95.0 in BusinessIntents' PurchaseCreditNoteRepository), while the actions run only later inside save() (entity.Supplier = Beans.get(NoteSupplierAction.class).calculate(entity)).

So on create, every check that reads an action-derived field reads the client's value (or null) instead of the value that will be stored. In BusinessIntents/base-purchase-invoices#39 a supplier note's Supplier is derived from its bill by an action; the duplicate: [Supplier, supplierNumber] warning is therefore never asked for a REST create that omits Supplier, although the stored row carries it. The update path (calculatedForUpdate) has the same question.

Fix wanted

  1. calculatedForCreate / calculatedForUpdate apply the entity's calculatedActionOnCreate / calculatedActionOnUpdate fields (in declaration order, after the expression fields they may read), so the checks see exactly what save() will store.
  2. An IT: an entity with an action-derived field and a duplicate / requiredWhen over it - a create that omits the field is refused / asked exactly as one that sends it.

Downstream: BusinessIntents/base-purchase-invoices#39.

主要语言
Java
星标
278
派生
97
平均合并
16 小时 46 分钟
30 天内合并 PR
265

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-dirigible/dirigible 的其他 Issue

查看 eclipse-dirigible/dirigible 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。