mirror of
https://github.com/corda/corda.git
synced 2025-02-28 20:06:25 +00:00
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:
parent
8f2977eac2
commit
3a0b64fdb7
@ -110,6 +110,7 @@ class CordaPersistence(
|
|||||||
fun createSession(): Connection {
|
fun createSession(): Connection {
|
||||||
// We need to set the database for the current [Thread] or [Fiber] here as some tests share threads across databases.
|
// We need to set the database for the current [Thread] or [Fiber] here as some tests share threads across databases.
|
||||||
_contextDatabase.set(this)
|
_contextDatabase.set(this)
|
||||||
|
currentDBSession().flush()
|
||||||
return contextTransaction.connection
|
return contextTransaction.connection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user