Skip to content

Allow query methods get multiple parameters from Map or JavaBean and add them to the SqlParameterSource. #1564

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

Closed
wants to merge 1 commit into from

Conversation

ZhouLuquan
Copy link

Hi, I submitted this PR to allow query methods get multiple parameters from Map or JavaBean and add them to the SqlParameterSource.

Since the Parameter does not provide a method to determine whether the parameter is declared with the given annotation type, I have to do it using reflection. I think it would be better if the Parameter provided more methods, such as "hasParameterAnnotation", etc.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 16, 2023
@mp911de mp911de added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 17, 2023
@mp911de
Copy link
Member

mp911de commented Jul 17, 2023

Thanks for your suggestion. We have general support for SpEL to bind parameters from input objects. You variant bears the risk of name clashing if table or join identifiers match the argument name. As we have already a flexible mechanism, we do not intend adding another one.

You might want to elaborate on why SpEL doesn't seem sufficient for your case and what we can improve there.

@mp911de
Copy link
Member

mp911de commented Jul 18, 2023

Sure, I created #1566 to update our documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants