hibernate-reactive
hibernate-reactive copied to clipboard
transaction isolation level
Hello, could you tell me, if it is possible to set Transaction Isolation Level in hibernate reactive for some native queries?
Ah yeah, this is a good question. There's no "bottled" way to do it rn, it's something I forgot we had to come back to. I also forget whether the Vert.x guys ended up adding an API for it or whether it has to be done by executing SQL on the connection. Either way, we need to expose that in some way in our APIs.
I will look into this.
So the issue in Vert.x is this one:
https://github.com/eclipse-vertx/vertx-sql-client/issues/432
If I'm not mistaken, there's not much we can really do here other than wait for them to add this functionality.
Because we're not starting the transaction ourselves, that's buried within the Vert.x API.
is this still an issue? Given:
emf.withTransaction((session, tx) -> {...});
How do I set the transaction isolation level in {...}
?
Well, on some databases you can do it by executing the appropriate native SQL, for example https://www.postgresql.org/docs/current/sql-set-transaction.html