-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
DeferredQueryInvocationHandler fails to unwrap QuerySqmImpl class outside of transaction #32766
Comments
As far as I can infer, this proceeds down to the common Now, the question is what to do on our side in such a case: We could reject the I'm wondering what the goal of that |
The goal is to potentially call some Hibernate ORM specific or internal methods. Why does the implementation return the target object if I pass Whatever you do, return the |
Fair enough, the existing code path for Also, scratch the above in terms of details, I mixed up the As for calling internal provider methods: Hibernate exposes its extended operations on interfaces, this does not usually require a cast to the actual implementation class. I'm just wondering whether Hibernate's That said, we are going to fix this through raw target |
Dankeschön 😊 |
Affects: All versions
DeferredQueryInvocationHandler
shouldreturn method.invoke(this.target, args);
in anelse
branch for theunwrap
method, otherwise the returned object might not be of the requested type. Consider e.g.This will fail with a class cast exception when using a proxy with
DeferredQueryInvocationHandler
.The text was updated successfully, but these errors were encountered: