-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
CallMetaDataContext.reconcileParameters overwrites cursor name #25707
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: backported
An issue that has been backported to maintenance branches
type: regression
A bug that is also a regression
Milestone
Comments
This seems to be an accidental regression introduced by our nullability efforts in 5.0. I'll fix this for 5.2.9, with a backport to 5.1.18 and 5.0.19 at the same time (for release on Sep 15). |
Thanks for the quick response. |
jhoeller
added a commit
that referenced
this issue
Sep 5, 2020
engimatic
pushed a commit
to engimatic/spring-framework
that referenced
this issue
Sep 29, 2020
zx20110729
pushed a commit
to zx20110729/spring-framework
that referenced
this issue
Feb 18, 2022
Closes spring-projectsgh-25707 (cherry picked from commit 40bf83c)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: backported
An issue that has been backported to maintenance branches
type: regression
A bug that is also a regression
Affects: \SB2
org.springframework:spring-jdbc:5.1.9.RELEASE
Explanation. Existing code is using a named cursor.
When the Resultset comes back, it is always empty, even though when I debug through the spring-jdbc I see it getting created with correct results. The issue is with the named cursor.
Example:
if I name the cursor 'returnValue' then it works. Searching through the code, I saw that it is over writing 'myCursorName' with 'returnValue'. 'returnValue' seems to be the default name used internally.
In SimpleJdbcCall:
'getScalarOutParameterName()' is returning 'returnValue' even though I named it as '.returningResultSet("myCursorName",'
But I also traced this to
CallMetaDataContext.reconcileParameters
around line 396:In older version it used to have (the last 3 lines):
paramName is 'returnValue', but it should be using what I supplied which is 'param.getName()'.
Then this would return the correct ruleset: return (T) doExecute(args).get(getScalarOutParameterName());
Please advise. Thanks.
The text was updated successfully, but these errors were encountered: