Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 1.56 KB

File metadata and controls

10 lines (7 loc) · 1.56 KB
@objectstack/objectql minor
@objectstack/rest minor

fix: two runtime gaps found by driving the CRM example end-to-end.

Delete of a parent with a required-FK child no longer fails with a misleading " is required" error. cascadeDeleteRelations defaulted a lookup FK to set_null; for a required FK that issued an UPDATE clearing the column, which the child's validator rejected with a 400 "<field> is required" naming a field that isn't even on the object being deleted (e.g. deleting a crm_account with opportunities → "account is required"). A required FK can't be nulled, so a defaulted set_null now escalates to restrict: the delete is refused with a clear 409 DELETE_RESTRICTED carrying the dependent object + count ("Cannot delete crm_account (…): 4 dependent crm_opportunity record(s) reference it via account … set deleteBehavior:'cascade'"). Explicit cascade/restrict and optional (nullable) lookups are unchanged.

Removed the hardcoded POST /data/lead/:id/convert endpoint + convertLead protocol method. It hardcoded bare object names (lead/account/contact/opportunity) and a fixed Salesforce field mapping into the framework runtime, so it was unreachable by any real (namespaced) app — /data/crm_lead/:id/convert 404s, and the literal lead object doesn't exist. Lead conversion is an app concern modeled correctly as a flow (the CRM ships a crm_convert_lead_wizard screen flow); baking a CRM-specific workflow into the framework was false surface. Untested, undocumented, unused by the example. Removed.