Transaction Creation Returns an Object by Default
- Last Updated: April 14, 2026
- 1 minute read
- MarkLogic Server
- Version 11.0
- Documentation
Previously, DatabaseClient.transactions.open returned a transaction id string by default, and you could use the withState parameter to request a transaction object instead. The use of the string form was deprecated as of MarkLogic 8.
As of MarkLogic 9 and Node.js Client API v2.0.0, DatabaseClient.transactions.open defaults to returning a transaction object.
To force the previous behavior, set withState to false when creating a transaction. This setting is deprecated and will be removed in a future release.