fix(core): Normalize Data Table return on update and allow string returns from DB (no-changelog) (#19106)

This commit is contained in:
Charlie Kolb
2025-09-02 16:29:59 +02:00
committed by GitHub
parent fbaee9ac02
commit 69e25606d8
2 changed files with 3 additions and 3 deletions

View File

@@ -268,7 +268,7 @@ export class DataStoreRowsRepository {
}
if (useReturning) {
return extractReturningData(result.raw);
return normalizeRows(extractReturningData(result.raw), columns);
}
const ids = affectedRows.map((row) => row.id);

View File

@@ -163,9 +163,9 @@ function hasRowReturnData(data: unknown): data is DataStoreRowReturn {
'id' in data &&
isNumber(data.id) &&
'createdAt' in data &&
isDate(data.createdAt) &&
(isDate(data.createdAt) || typeof data.createdAt === 'string') &&
'updatedAt' in data &&
isDate(data.updatedAt)
(isDate(data.updatedAt) || typeof data.updatedAt === 'string')
);
}