CORDA-1548 - Hibernate session not flushed before handing over raw JDBC session to user code (e.g. coin selection) (#3266) (#3865)

* Hibernate session flushed before handing over raw JDBC session to user code + test - inserting and selecting cash in the same transaction
* Additional two tests copied from Enterprise repo
This commit is contained in:
Katelyn Baker 2018-09-13 13:48:04 +01:00 committed by GitHub
parent 8f2977eac2
commit 3a0b64fdb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,6 +110,7 @@ class CordaPersistence(
fun createSession(): Connection {
// We need to set the database for the current [Thread] or [Fiber] here as some tests share threads across databases.
_contextDatabase.set(this)
currentDBSession().flush()
return contextTransaction.connection
}