diff --git a/pom.xml b/pom.xml
index ee6570e14e..fd1b6ed5ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-relational-parent
- 1.1.0.BUILD-SNAPSHOT
+ 1.1.0.DATAJDBC-381-SNAPSHOT
pom
Spring Data Relational Parent
diff --git a/spring-data-jdbc-distribution/pom.xml b/spring-data-jdbc-distribution/pom.xml
index f6d4373844..876181efa1 100644
--- a/spring-data-jdbc-distribution/pom.xml
+++ b/spring-data-jdbc-distribution/pom.xml
@@ -14,7 +14,7 @@
org.springframework.data
spring-data-relational-parent
- 1.1.0.BUILD-SNAPSHOT
+ 1.1.0.DATAJDBC-381-SNAPSHOT
../pom.xml
diff --git a/spring-data-jdbc/pom.xml b/spring-data-jdbc/pom.xml
index cfb1e9443b..6fc94897e8 100644
--- a/spring-data-jdbc/pom.xml
+++ b/spring-data-jdbc/pom.xml
@@ -5,7 +5,7 @@
4.0.0
spring-data-jdbc
- 1.1.0.BUILD-SNAPSHOT
+ 1.1.0.DATAJDBC-381-SNAPSHOT
Spring Data JDBC
Spring Data module for JDBC repositories.
@@ -14,7 +14,7 @@
org.springframework.data
spring-data-relational-parent
- 1.1.0.BUILD-SNAPSHOT
+ 1.1.0.DATAJDBC-381-SNAPSHOT
diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.java
index 6c7f2bdeb4..461ce0e204 100644
--- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.java
+++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.java
@@ -36,6 +36,7 @@
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
+import org.springframework.data.relational.core.sql.SqlUtils;
import org.springframework.data.relational.domain.Identifier;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
@@ -119,7 +120,7 @@ public Object insert(T instance, Class domainType, Identifier identifier)
operations.update( //
sql(domainType).getInsert(new HashSet<>(Arrays.asList(parameterSource.getParameterNames()))), //
- parameterSource, //
+ sanitize(parameterSource), //
holder //
);
@@ -136,7 +137,7 @@ public boolean update(S instance, Class domainType) {
RelationalPersistentEntity persistentEntity = getRequiredPersistentEntity(domainType);
return operations.update(sql(domainType).getUpdate(),
- getParameterSource(instance, persistentEntity, "", Predicates.includeAll())) != 0;
+ sanitize(getParameterSource(instance, persistentEntity, "", Predicates.includeAll()))) != 0;
}
/*
@@ -147,7 +148,7 @@ public boolean update(S instance, Class domainType) {
public void delete(Object id, Class> domainType) {
String deleteByIdSql = sql(domainType).getDeleteById();
- MapSqlParameterSource parameter = createIdParameterSource(id, domainType);
+ MapSqlParameterSource parameter = sanitize(createIdParameterSource(id, domainType));
operations.update(deleteByIdSql, parameter);
}
@@ -217,7 +218,7 @@ public T findById(Object id, Class domainType) {
MapSqlParameterSource parameter = createIdParameterSource(id, domainType);
try {
- return operations.queryForObject(findOneSql, parameter, (RowMapper) getEntityRowMapper(domainType));
+ return operations.queryForObject(findOneSql, sanitize(parameter), (RowMapper) getEntityRowMapper(domainType));
} catch (EmptyResultDataAccessException e) {
return null;
}
@@ -248,7 +249,7 @@ public Iterable findAllById(Iterable> ids, Class domainType) {
String findAllInListSql = sql(domainType).getFindAllInList();
- return operations.query(findAllInListSql, parameterSource, (RowMapper) getEntityRowMapper(domainType));
+ return operations.query(findAllInListSql, sanitize(parameterSource), (RowMapper) getEntityRowMapper(domainType));
}
/*
@@ -274,7 +275,7 @@ public Iterable