-
Notifications
You must be signed in to change notification settings - Fork 356
Only the contents of collections gets converted. #1356
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
Conversation
Do you have an approximate timeline for when this PR will be merged/released? |
e4e7a2b
to
365586c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment on the PR. Do you want to update this one or do you want me to look into this?
@@ -189,7 +190,7 @@ private void convertAndAddParameter(MapSqlParameterSource parameters, Parameter | |||
Assert.notNull(type, "@Query parameter type could not be resolved"); | |||
|
|||
JdbcValue jdbcValue; | |||
if (value instanceof Iterable) { | |||
if (value instanceof Collection && resolvableType.hasGenerics()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make sense to follow our general conventions to include Iterable
and Streamable
types but exclude custom domain types that implement Iterable
.
See https://github.com/spring-projects/spring-data-commons/blob/main/src/main/java/org/springframework/data/util/TypeDiscoverer.java#L118-L126 for further reference. Also, we should consider CustomCollections
to support usage of e.g. vavr collection types as follow up.
@mp911de I'd appreciate it if you could look into this. |
That's merged and backported now. |
Contents of Iterables that aren't collections will not be converted individually.
Closes #1343
Replaces #1345