Commit efeefea
fix: preserve cross-module associations on CREATE object actions
A `create TargetMod.Entity (OwnerMod.Assoc = $Ref)` statement
round-tripped as a plain attribute assignment when the association
lived in a module other than the create target. Two sides of the
same bug:
1. **Describer** (`formatAction` on `CreateObjectAction`) stripped
every association member down to its bare name
(`Module.Assoc` → `Assoc`), so the authored cross-module
qualifier was lost.
2. **Builder** (`resolveMemberChange`) then queried the create
target's module for the bare name. The association was not
defined there, so the lookup fell through to the attribute
slot and Studio Pro reopened the MPR with CE1613 "selected
attribute no longer exists".
Fixes:
- Describer now keeps the `Module.` prefix on any association
whose owning module differs from the create target's module.
- Builder now uses the authored module (when the member name is
qualified) to look up the association, matching how the describer
expresses it.
Added builder unit test
\`TestResolveMemberChange_CrossModuleAssociationKeepsAssociationSlot\`
for the synthetic cross-module pattern.
Part of #352.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d73e9c9 commit efeefea
3 files changed
Lines changed: 105 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | | - | |
1191 | | - | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
1192 | 1194 | | |
1193 | 1195 | | |
| 1196 | + | |
1194 | 1197 | | |
| 1198 | + | |
1195 | 1199 | | |
1196 | 1200 | | |
1197 | 1201 | | |
1198 | 1202 | | |
1199 | 1203 | | |
1200 | 1204 | | |
1201 | | - | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1202 | 1211 | | |
1203 | | - | |
| 1212 | + | |
1204 | 1213 | | |
1205 | 1214 | | |
1206 | 1215 | | |
| |||
1214 | 1223 | | |
1215 | 1224 | | |
1216 | 1225 | | |
1217 | | - | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
1218 | 1230 | | |
1219 | | - | |
1220 | 1231 | | |
1221 | 1232 | | |
1222 | 1233 | | |
| |||
Lines changed: 70 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
199 | 206 | | |
200 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
201 | 214 | | |
202 | | - | |
203 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
204 | 219 | | |
205 | 220 | | |
206 | 221 | | |
| |||
0 commit comments