diff --git a/node.js/cds-tx.md b/node.js/cds-tx.md index 6d4bca217..9ded82a96 100644 --- a/node.js/cds-tx.md +++ b/node.js/cds-tx.md @@ -466,7 +466,7 @@ The implementation guarantees decoupled execution from request-handling threads/ Think of it as if each run happens in an own thread with own context, with automatic transaction management. -By default, the nested context inherits all values from `cds.context`, especially user and tenant. Use the argument `options` if you want to override values, for example to run the background thread with different user or tenant than the one you called `cds.spawn()` from. +By default, the nested context inherits all values except `timestamp` from `cds.context`, especially user and tenant. Use the argument `options` if you want to override values, for example to run the background thread with different user or tenant than the one you called `cds.spawn()` from. diff --git a/node.js/events.md b/node.js/events.md index ed0c3d13a..946359d16 100644 --- a/node.js/events.md +++ b/node.js/events.md @@ -210,8 +210,8 @@ To do something which requires databases in `succeeded`/`failed` handlers, use ` Example: ```js -req.on('done', () => { - await cds.tx(() => { +req.on('done', async () => { + await cds.tx(async () => { await UPDATE `Stats` .set `views = views + 1` .where `book_ID = ${book.ID}` }) })