Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help


search: keywords: ['java', 'otransaction', 'odatabasedocument', 'getdatabase']

OTransaction - getDatabase()

Retrieves the database on which the transaction is running.

Getting Databases

Transactions run on particular databases, or more specifically within an ODatabaseDocument instance. In the event that you need to operate on the database currently running the transaction, you can use this method to retrieve it.

Syntax

ODatabaseDocument OTransaction().getDatabase()

Return Value

This method returns an ODatabaseDocument instance, which represents the database on which the transaction is running.