StoredProcedureQuery getResultList doesn't work as expected

Hi every one.
After having my project upgraded to Spring Boot 3 (with Hibernate 6), I found out that the new implementation of StoredProcedureQuery.getResultList() no longer works as expected. Here is an example. Please run the test I added in this commit to see it fails.
I debugged and found out that

hibernate-core/src/main/java/org/hibernate/result/internal/OutputsImpl.java#L162

seems to be the problem.
I don’t really understand what the result set mapping has to do with INOUT parameters because I think they are two different concerns (correct me if I am wrong, I am an ordinary Hibernate user and I do not understand the internal implementation well).
I tried removing that block of code, basically result set extraction has no thing to do with INOUT parameter, and it seems to work. Please checkout this commit and see that it returns the correct result.
Please let me know if what I found was correct and I am eligible to raise a PR to make my first contribution to the framework.
I am looking forward to hearing from Hibernate team soon. Thank you.

Looks like a bug to me. Please create a bug ticket in our issue tracker and create a PR with this test. If you feel like you know what the problem is, please add a fix as separate commit to that PR.

1 Like

Thanks Beikov, will do.

I’ve created a bug here

1 Like

Hi, when can we expect a fix on this one? It’s a pretty nasty bug for our migration to Spring Boot 3.2 and Hibernate 6.

Hi, I already proposed a fix. However no one from Hibernate team ever gave me a feedback on this. I am not sure about the process either

If you are a Red Hat customer, you can file a support case to speed up the process or provide a PR with a fix.

I raised a PR here. HHH-17847: fix StoredProcedureQuery.getResultList() by nhuphucnguyen · Pull Request #8680 · hibernate/hibernate-orm · GitHub

2 Likes