Skip to content

Commit 77b6b65

Browse files
committed
test(objectql): read the stored row with a plain driver query, which needs neither an object key nor an as any (#29538)
Claude-Session: https://claude.ai/code/session_01JQwxbXRug3R6WZAjtFuAoS Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 143b919 commit 77b6b65

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/objectql/src/engine-default-value-tokens.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('[#4560] the `current_user` defaultValue token is engine-owned', () =>
106106
// [#29538] The answer is the next read's record: a column nothing was
107107
// stored in reads `null`. "Unset" is the STORED row's own: no key at all.
108108
expect(row.owner).toBeNull();
109-
const stored = await engine.getDriverForObject('tok_doc')!.findOne('tok_doc', { object: 'tok_doc', where: { id: row.id } });
109+
const stored = await engine.getDriverForObject('tok_doc')!.findOne('tok_doc', { where: { id: row.id } });
110110
expect(stored).not.toHaveProperty('owner');
111111
});
112112

‎packages/objectql/src/engine-lookup-referential-integrity.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ describe('[#4441] a lookup id that resolves to nothing is refused', () => {
373373
// [#29538] The answer reads the unstored column `null`, as the next read
374374
// does; the strip is the STORED row's own: no key at all.
375375
expect(row.recorded_by, 'stripped before the reference check, not refused by it').toBeNull();
376-
const stored = await engine.getDriverForObject('ref_audit_note')!.findOne('ref_audit_note', { object: 'ref_audit_note', where: { id: row.id } });
376+
const stored = await engine.getDriverForObject('ref_audit_note')!.findOne('ref_audit_note', { where: { id: row.id } });
377377
expect(stored, 'stripped before the reference check, not refused by it').not.toHaveProperty('recorded_by');
378378
});
379379

‎packages/objectql/src/engine-select-option-default.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const sys = { context: { isSystem: true } } as any;
7474

7575
/** The row as the stub driver stored it — what the write persisted, before any engine shaping. */
7676
const storedRow = (engine: ObjectQL, object: string, id: unknown) =>
77-
engine.getDriverForObject(object)!.findOne(object, { object, where: { id } });
77+
engine.getDriverForObject(object)!.findOne(object, { where: { id } });
7878

7979
describe('[#7246] the option marked `default: true` is the field default', () => {
8080
let engine: ObjectQL;

0 commit comments

Comments
 (0)