Bugfix: What is the correct saveFn argument order in useCrudForm?
Documentation for Sessions
🐛 Bugfix: What is the correct saveFn argument order in useCrudForm?
Date: 2026-03-23
Time: 16:26:51 UTC
Session: gspace1-261.3
Agent: storage
Confidence: 99%
Status: ✅ Documented
📋 Decision Context
Question:
What is the correct saveFn argument order in useCrudForm?
Task: S257: Platform generation pipeline fixes
🎯 Decision Made
Chosen:
Changed stub from saveFn(id, data) to saveFn(data, id) matching real SDK signature. Real composable at use-crud-form.ts:95 calls config.saveFn(formData, id).
Options Considered:
- No alternatives documented
💭 Reasoning
Reversed arguments cause silent data corruption — backend receives the entity ID as the data payload and the form data as the ID. This would pass in preview but produce wrong results.
📁 Files Involved
libs/libs-structural/platform-preview/src/lib/config/sdk-preview-stubs.tslibs/core/module-base/src/lib/crud/composables/use-crud-form.ts
🔗 Related
- Decision ID:
dev_1774283211135_nafrsnq - Session: 261
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation