@@ -16686,6 +16686,17 @@ export class ObjectQL implements IObjectQLEngine {
1668616686 result = isBatch
1668716687 ? rowsWithDeclaredColumnsOnly(result as unknown[], declaredInsertColumns)
1668816688 : withDeclaredColumnsOnly(result, declaredInsertColumns);
16689+ // [#29538] …and answered on every stored declared column, as the next
16690+ // read of the row answers it (#29408): a column the driver did not
16691+ // echo (driver-mongodb and driver-memory store only written keys) is
16692+ // `null`. A write names no projection, so it selects the whole stored
16693+ // record. Before the formulas, so a formula over an unwritten column
16694+ // evaluates against `null` as the read's does; inside the verb, so the
16695+ // security middleware's field mask still deletes an FLS-refused key.
16696+ const insertAnswerColumns = selectedStoredColumns(schemaForValidation, undefined);
16697+ result = isBatch
16698+ ? rowsWithSelectedColumnsAnswered(result as unknown[], insertAnswerColumns)
16699+ : withSelectedColumnsAnswered(result, insertAnswerColumns);
1668916700
1669016701 // Coerce `boolean` fields (SQLite/libsql return 0/1) to real booleans on
1669116702 // the after-hook view so flow trigger conditions (`record.is_escalated
@@ -18355,6 +18366,9 @@ export class ObjectQL implements IObjectQLEngine {
1835518366 // `data.record.updated` event and the door's ingress strip. A
1835618367 // `null` readback (the row left the caller's scope) stays `null`.
1835718368 result = withDeclaredColumnsOnly(result, declaredColumnSet(updateSchema));
18369+ // [#29538] Same answer on the stored declared columns as the
18370+ // insert result and the next read (#29408).
18371+ result = withSelectedColumnsAnswered(result, selectedStoredColumns(updateSchema, undefined));
1835818372 // [#27495] The handle the stored row named before, where this
1835918373 // statement cleared or replaced it.
1836018374 retiredSecrets = retiredSecretSlots(updateSchema, [priorRecord], hookContext.input.data);
0 commit comments