You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e99cf2c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .changeset/37151-record-lock-source.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
'@objectstack/spec': patch
3
3
'@objectstack/plugin-approvals': patch
4
4
'@objectstack/rest': patch
5
+
'@objectstack/client': patch
5
6
---
6
7
7
8
feat(plugin-approvals): the record lock reads say whether a row is held by its own approval or by its master's
@@ -18,4 +19,6 @@ When both hold (a line with a pending request of its own, under a held master),
18
19
19
20
The `IApprovalService` return types gain the optional `lockSource?: 'record' | 'master'`, so an existing implementation that answers `{ locked }` alone still satisfies the contract; the REST doors then serve `{ locked: true }` without a kind.
20
21
21
-
Both doors now count a row as readable by one rule: the caller's read must hand back the row whose id is the asked id, spelled as asked. The single-record door used to accept any row the read handed back, so an id the database matched loosely (a different letter case under a case-insensitive collation, `07` for a numeric `7`) answered the lock there and `null` in the batch door. It now answers `null` at both. A client asking with the ids the server gave it sees no change.
22
+
Which rows count as readable is unchanged at both doors. The two doors keep different readability anchors on purpose: the single door counts any returned row, the batch door only the row whose id is the asked id; aligning them would narrow a published answer (seat ruling on PR #37191). So an id the database matches only under another spelling (a different letter case, `07` for a numeric `7`) answers its lock at the single-record door and `null` in the batch door; a client asking with the ids the server gave it gets the same answer from both.
23
+
24
+
`@objectstack/client`: `client.approvals.getRecordLock` and `getRecordLocks` type the answer with the optional `lockSource?: 'record' | 'master'`.
0 commit comments