search: keywords: ['java', 'odatabasedocument', 'gettransaction']

ODatabaseDocument - getTransaction()

Retrieves the current transaction.

Fetching Transactions

OrientDB is ACID compliant and supports the use of transactions. Internally, transactions are tracked using an OTransaction instance. Using this method, you can retrieve the active OTransaction instance. In the event that no transaction is currently active on the database, this method returns an OTransactionNoTx instance.

Syntax

OTransaction ODatabaseDocument().getTransaction()

Return Value

This method returns an OTransaction implementation.