Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transaction isolation level #875

Open
Xset-s opened this issue Jun 26, 2021 · 4 comments
Open

transaction isolation level #875

Xset-s opened this issue Jun 26, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request waiting We are waiting for another PR or issue to be solved before merging this one

Comments

@Xset-s
Copy link

Xset-s commented Jun 26, 2021

Hello, could you tell me, if it is possible to set Transaction Isolation Level in hibernate reactive for some native queries?

@gavinking
Copy link
Member

gavinking commented Jun 26, 2021

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.

@gavinking gavinking added the enhancement New feature or request label Jun 26, 2021
@gavinking gavinking self-assigned this Jun 26, 2021
@gavinking gavinking changed the title How to set Transaction Isolation Level? transaction isolation level Jun 26, 2021
@gavinking
Copy link
Member

So the issue in Vert.x is this one:

eclipse-vertx/vertx-sql-client#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.

@gavinking gavinking added the waiting We are waiting for another PR or issue to be solved before merging this one label Jul 8, 2021
@siddjain
Copy link

siddjain commented Oct 4, 2022

is this still an issue? Given:

emf.withTransaction((session, tx) -> {...});

How do I set the transaction isolation level in {...}?

@gavinking
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting We are waiting for another PR or issue to be solved before merging this one
Projects
None yet
Development

No branches or pull requests

3 participants