Commit 56366c4
feat(intent): generates.items supports a non-composition FK-referencing source item + decimal item defaults
An item create-from (generates with an items: block) assumed the item source
is a composition child living in the source document's perspective package,
and rendered numeric item defaults as bare literals. Two fixes so an item
source that is a SEPARATE primary entity referencing the source document by FK
(an aggregate document whose per-line detail is its own entity) works:
- The source item's package resolves from its OWN perspective (a new
fromItemPerspective, == fromPerspective for the composition-child case, so
no change to existing create-froms); the template qualifies srcItem with it.
- Item defaults use childAssignments (numeric -> BigDecimal), matching the
schedule-children path, so a decimal line column (quantity/price) gets a
compilable value.
GlueGeneratesTest gains a non-composition-source case asserting the item
perspective and the BigDecimal default.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent c116a9a commit 56366c4
4 files changed
Lines changed: 82 additions & 3 deletions
File tree
- components
- engine/engine-intent/src
- main/java/org/eclipse/dirigible/components/intent/generator
- test/java/org/eclipse/dirigible/components/intent/generator
- template/template-application-events-java/src/main/resources/META-INF/dirigible/template-application-events-java/events
- ui/service-generate/src/main/resources/META-INF/dirigible/service-generate/template
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
616 | 624 | | |
617 | 625 | | |
618 | 626 | | |
619 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
620 | 631 | | |
621 | 632 | | |
622 | 633 | | |
| 634 | + | |
623 | 635 | | |
624 | 636 | | |
625 | 637 | | |
| |||
Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
215 | 278 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
962 | 966 | | |
963 | 967 | | |
964 | 968 | | |
| |||
0 commit comments