intent: the roll-up capacity guard runs before calculatedOnCreate - a calculated child amount is guarded as 0
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 57/100
Research direction
Start with components/template/template-application-dao-java/src/main/resources/META-INF/dirigible/template-application-dao-java/data/Repository.java.template, especially save() around lines 439–465 and the update path around line 569. Compare when roll-up capacity guards read the child amount with when create-time and update-time calculated fields are assigned; the body also points to calculatedForCreate(entity) and issues #7542 and #7544. Done when the guard evaluates the calculated amount and rejects a create or update that would exceed capacity.
Written by the indexing model from the issue text.
Description
Problem
The generated repository's save() runs the roll-up capacity guard before the create-time calculated fields are assigned. A child whose summed of field is calculatedOnCreate (an expression or an action, e.g. Amount = Quantity * Price) reaches the guard as null, which is counted as 0. So the guard never refuses an over-capacity create, and the roll-up then sums the real value and drives the balance negative.
Where (release commit 862f6d1a, 14.93.0)
In Repository.java.template, save():
#rollupGuardCheck()/#gatedRollupGuardCheck()run at ~L450;- the
calculatedActionOnCreate/calculatedPropertyExpressionCreateassignments come at ~L456-L464; - the guard body reads
entity.<of>and treats null asBigDecimal.ZERO.
guardAt: (#7542) moves the guard to a later status, which works for a document total. It does nothing for a plain calculated child amount on create.
Expected
Assign the create-time calculated fields before the capacity guards, or evaluate the guard on calculatedForCreate(entity) (the candidate row the checks already use, #7544). The same ordering question applies to the update path (~L569 vs the on-update calcs).
Found on 14.88.0 by BusinessIntents (wave 2026-10-17) and re-checked against the 14.93.0 source; still present.
🤖 Generated with Claude Code
- Dominant language
- Java
- Stars
- 278
- Forks
- 97
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 228
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-dirigible/dirigible
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
eclipse-dirigible/dirigible#7958 ·
Maintainers usually reply within 1 day
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-dirigible/dirigible#7945 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-dirigible/dirigible#7891 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-dirigible/dirigible#6538 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
eclipse-dirigible/dirigible#4812 ·
Maintainers usually reply within 1 day
All issues in eclipse-dirigible/dirigible
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
account bug communication lecture
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
area/server bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/java-sdk#1196 ·
Maintainers usually reply within 1 day