You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when using Quarkus with reactive hibernate and trying to run this findById(id, LockModeType.PESSIMISTIC_WRITE), I get following Error: JPA error: java.lang.UnsupportedOperationException
The error seems to be coming from here: hibernate-reactive/hibernate-reactive-core/src/main/java/org/hibernate/reactive/event/impl/DefaultReactiveLockEventListener.java
Lines 238 to 241 in 5cb015d @OverRide
public void onLock(LockEvent event) throws HibernateException {
throw new UnsupportedOperationException();
}
Is this intended, or is the implementation not finished? I can see that the last time this was edited was 4 years ago.
I was able to reproduce the issue when using a OneToMany and ManyToOne relationship.
By doing this, hibernate is forced to do a JOIN and the SELECT FOR UDPATE cannot be done in the same request.
When hibernate is trying to do the followup Lock, it throws an error.
The error should already show up after creating a Fruit and fetching it.
No Owner object is needed.
It's only there to trigger the issue.
The text was updated successfully, but these errors were encountered:
alexjaravete
changed the title
Reactive find with lock in Quarkus with reactive hibernate Issue reprocuded
Reactive find with lock in Quarkus with reactive hibernate - Issue reproduced
May 2, 2024
Hi, this is related to this issue #1896.
I was able to reproduce the issue when using a
OneToMany
andManyToOne
relationship.By doing this, hibernate is forced to do a
JOIN
and theSELECT FOR UDPATE
cannot be done in the same request.When hibernate is trying to do the followup Lock, it throws an error.
The error should already show up after creating a
Fruit
and fetching it.No
Owner
object is needed.It's only there to trigger the issue.
This is the repository with the reproduced issue: https://github.com/alexjaravete/quarkus-quickstarts/tree/findById/hibernate-reactive-panache-quickstart
The text was updated successfully, but these errors were encountered: