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:


💭 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


🔗 Related


Auto-generated by MCP Smart Consolidation