[hibernate-issues] [JIRA] (HHH-14131) NativeSQLQueryConstructorReturn is not processed by SQLQueryReturnProcessor

Adrian Riley (JIRA) jira at hibernate.atlassian.net
Fri Jul 31 03:55:26 EDT 2020


Adrian Riley ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5f23cba0e8c456002248d98b ) *created* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOTE0ZGUwZGFkMGVlNGE3NzlkNzBiNjUzMDBjMTExZGEiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14131?atlOrigin=eyJpIjoiOTE0ZGUwZGFkMGVlNGE3NzlkNzBiNjUzMDBjMTExZGEiLCJwIjoiaiJ9 ) HHH-14131 ( https://hibernate.atlassian.net/browse/HHH-14131?atlOrigin=eyJpIjoiOTE0ZGUwZGFkMGVlNGE3NzlkNzBiNjUzMDBjMTExZGEiLCJwIjoiaiJ9 ) NativeSQLQueryConstructorReturn is not processed by SQLQueryReturnProcessor ( https://hibernate.atlassian.net/browse/HHH-14131?atlOrigin=eyJpIjoiOTE0ZGUwZGFkMGVlNGE3NzlkNzBiNjUzMDBjMTExZGEiLCJwIjoiaiJ9 )

Issue Type: Bug Affects Versions: 5.4.19 Assignee: Unassigned Components: hibernate-core Created: 31/Jul/2020 00:55 AM Environment: hibernate-core-5.4.12.Final
JDK8
Windows 10 & Linux
Oracle Priority: Major Reporter: Adrian Riley ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5f23cba0e8c456002248d98b )

I am trying to call a stored procedure with 2 OUT parameters. I have declared a NamedStoredProcedureQuery referencing a SqlResultSetMapping:
{{
@NamedStoredProcedureQuery(name = "set_case_handler", procedureName = "API_CUSTOMER_AGREEMENT_PKG.set_case_handler",
parameters =

{ @StoredProcedureParameter(mode = ParameterMode.IN, name = "p_agreement_id", type = String.class), @StoredProcedureParameter(mode = ParameterMode.OUT, name = "p_success_o", type = Integer.class), @StoredProcedureParameter(mode = ParameterMode.OUT, name = "p_error_message_o", type = String.class) }

,
resultSetMappings = "procedure_result_mapping")
@SqlResultSetMapping(name = "procedure_result_mapping", classes = {
@ConstructorResult(targetClass = ProcedureResult.class, columns =

{ @ColumnResult(name = "p_success_o", type = Integer.class), @ColumnResult(name = "p_error_message_o", type = String.class) }

)
}
}}

The stored procedure is executed and produces a Map of the two output parameters. Then SQLQueryReturnProcessor.processReturn is called, which calls processConstructorReturn. But this method is empty, so the SqlResultSetMapping has no effect, and the Map is returned as the query result.

Is this by design, or is the functionality just missing?

( https://hibernate.atlassian.net/browse/HHH-14131#add-comment?atlOrigin=eyJpIjoiOTE0ZGUwZGFkMGVlNGE3NzlkNzBiNjUzMDBjMTExZGEiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14131#add-comment?atlOrigin=eyJpIjoiOTE0ZGUwZGFkMGVlNGE3NzlkNzBiNjUzMDBjMTExZGEiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100140- sha1:33445dc )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200731/cd04b019/attachment.html 


More information about the hibernate-issues mailing list