I have made a stored procedure that returns multiple resultsets from multiple tables. Therefore each resultset is made out of different columns. These resultsets are retrieved by an ProcedureOutputs object from the Hibernate framework. The first resultset is retrieved with no problems, however Hibernate tries to map the resultsets after that using the column set from the first resultset. This results in the error

2020-04-26 21:28:55.112 ERROR 22164 --- [nio-8080-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper : Column 'firstColumnFromFirstResultSet' not found.

firstColumnFromFirstResultSet is an example here.

My question is: Is there any way to let Hibernate know that each resultset is unique and that it shouldn't try to map the second resultset based on the columns of the first resultset?

Thank you

  • yes it can and the languages like php java c# support multiquery, buthibernate doesn't, i searched again and i couldn't find any functioning mention of it. – nbk Apr 26 at 21:07
  • @nbk thank you, now i know that atleast its not a bug – Maurice Apr 27 at 10:09
  • hm, it is an old flaw, that should have been corrected. – nbk Apr 27 at 10:14
  • @nbk I made an issue for this: hibernate.atlassian.net/browse/HHH-13983 – Maurice Apr 27 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.