Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reference/rest/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ type Product @table @export {
id: Long @primaryKey
name: String
resellerIds: [Long] @indexed
resellers: [Reseller] @relationship(from: "resellerId")
resellers: [Reseller] @relationship(from: "resellerIds")
}
```

Expand Down
4 changes: 2 additions & 2 deletions release-notes/v5-lincoln/v5-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class MyResource {
// this function is within a transaction, with a consistent snapshot of data that won't change, but previous code could
// call Table.get without a context, it would not use the current transaction and would instead get the latest data
while ((await Table.get(target)).status !== 'ready') {
delay(100);
await delay(100);
}
return Table.get(target);
}
Expand All @@ -93,7 +93,7 @@ class MyResource {
// now we can call Table.get and it will read the latest data.
// we could also explicitly start a new transaction here for each get:
while ((await transaction(() => Table.get(target))).status !== 'ready') {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example calls transaction(...) but it isn't imported — the import on line 87 only brings in getContext, so the snippet isn't copy-pasteable as written (same gap gemini flagged). Suggest:

import { getContext, transaction } from 'harper';

delay(100);
await delay(100);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In this code example, transaction is used on line 95 but is not imported from 'harper' on line 87 (which only imports getContext). To ensure the example is fully functional and copy-pasteable, please update the import statement on line 87 to include transaction:

import { getContext, transaction } from 'harper';

}
return Table.get(target);
}
Expand Down