Convert only contents of collections using StringBasedJdbcQuery.
Contents of Iterables that aren't collections will not be converted individually. Closes #1343 Original pull request: #1356
This commit is contained in:
committed by
Mark Paluch
parent
6855b9bd25
commit
d1e039a387
@@ -20,6 +20,7 @@ import static org.springframework.data.jdbc.repository.query.JdbcQueryExecution.
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.sql.SQLType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -189,7 +190,7 @@ public class StringBasedJdbcQuery extends AbstractJdbcQuery {
|
||||
Assert.notNull(type, "@Query parameter type could not be resolved");
|
||||
|
||||
JdbcValue jdbcValue;
|
||||
if (value instanceof Iterable) {
|
||||
if (value instanceof Collection && resolvableType.hasGenerics()) {
|
||||
|
||||
List<Object> mapped = new ArrayList<>();
|
||||
SQLType jdbcType = null;
|
||||
|
||||
Reference in New Issue
Block a user