Skip to content

Override toString() in out-of-the-box implementations of SqlParameterSource [SPR-9753] #14387

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
spring-projects-issues opened this issue Sep 4, 2012 · 5 comments
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

João Loureiro opened SPR-9753 and commented

MapSqlParameterSource and BeanPropertySqlParameterSource should override toString() appropriately, that is, the returned string should represent the object in terms of the parameter values it contains (at least; optionally, the types as well). The returned string can use a Map-like representation.


Affects: 3.2 M1

Reference URL: http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/jdbc/core/namedparam/SqlParameterSource.html

Referenced from: pull request #2080

@spring-projects-issues
Copy link
Collaborator Author

João Loureiro commented

This eases debugging/logging in client code.

@spring-projects-issues
Copy link
Collaborator Author

Sébastien Deleuze commented

Looks legit based on Jens Schauder feedback, it would be a minor but useful improvement that should be implemented as a base class.

@spring-projects-issues spring-projects-issues added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement labels Jan 11, 2019
@zeeshan58
Copy link

Hi, is anyone working on this issue, because I want to work on it.

@izeye
Copy link
Contributor

izeye commented Apr 22, 2019

This seems to be resolved via #2080.

@snicoll
Copy link
Member

snicoll commented Apr 23, 2019

Good catch Johnny!

Duplicate of #2080

@snicoll snicoll closed this as completed Apr 23, 2019
@snicoll snicoll added the status: duplicate A duplicate of another issue label Apr 23, 2019
@snicoll snicoll removed this from the General Backlog milestone Apr 23, 2019
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: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants