keys = holder.getKeys();
+ if (keys == null || persistentEntity.getIdProperty() == null) {
+ return null;
+ }
+ return null;
+ }
+ }
private EntityRowMapper> getEntityRowMapper(Class> domainType) {
return new EntityRowMapper<>(getRequiredPersistentEntity(domainType), context, converter, accessStrategy);
diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/support/JdbcUtil.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/support/JdbcUtil.java
index 12ad4b39d..e86803e1f 100644
--- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/support/JdbcUtil.java
+++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/support/JdbcUtil.java
@@ -32,6 +32,7 @@ import org.springframework.jdbc.support.JdbcUtils;
* Contains methods dealing with the quirks of JDBC, independent of any Entity, Aggregate or Repository abstraction.
*
* @author Jens Schauder
+ * @author Thomas Lang
*/
@UtilityClass
public class JdbcUtil {
@@ -42,7 +43,7 @@ public class JdbcUtil {
sqlTypeMappings.put(String.class, Types.VARCHAR);
sqlTypeMappings.put(BigInteger.class, Types.BIGINT);
- sqlTypeMappings.put(BigDecimal.class, Types.NUMERIC);
+ sqlTypeMappings.put(BigDecimal.class, Types.DECIMAL);
sqlTypeMappings.put(Byte.class, Types.TINYINT);
sqlTypeMappings.put(byte.class, Types.TINYINT);
sqlTypeMappings.put(Short.class, Types.SMALLINT);
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/AggregateTemplateIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/AggregateTemplateIntegrationTests.java
index 5c9390928..1f8fb01ee 100644
--- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/AggregateTemplateIntegrationTests.java
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/AggregateTemplateIntegrationTests.java
@@ -34,6 +34,7 @@ import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.relational.core.conversion.RelationalConverter;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
+import org.springframework.test.annotation.IfProfileValue;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@@ -46,6 +47,7 @@ import java.util.List;
* Integration tests for {@link JdbcAggregateTemplate}.
*
* @author Jens Schauder
+ * @author Thomas Lang
*/
@ContextConfiguration
@Transactional
@@ -143,6 +145,7 @@ public class AggregateTemplateIntegrationTests {
}
@Test // DATAJDBC-112
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void updateReferencedEntityFromNull() {
legoSet.setManual(null);
@@ -201,6 +204,7 @@ public class AggregateTemplateIntegrationTests {
}
@Test // DATAJDBC-112
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void changeReferencedEntity() {
template.save(legoSet);
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryPropertyConversionIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryPropertyConversionIntegrationTests.java
index 04ca4bff7..5e99a00d5 100644
--- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryPropertyConversionIntegrationTests.java
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryPropertyConversionIntegrationTests.java
@@ -43,6 +43,7 @@ import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.relational.core.mapping.event.BeforeSaveEvent;
import org.springframework.data.repository.CrudRepository;
+import org.springframework.test.annotation.IfProfileValue;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@@ -53,6 +54,7 @@ import org.springframework.transaction.annotation.Transactional;
* something the database driver can handle.
*
* @author Jens Schauder
+ * @author Thomas Lang
*/
@ContextConfiguration
@Transactional
@@ -88,6 +90,7 @@ public class JdbcRepositoryPropertyConversionIntegrationTests {
@Autowired DummyEntityRepository repository;
@Test // DATAJDBC-95
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void saveAndLoadAnEntity() {
EntityWithColumnsRequiringConversions entity = repository.save(createDummyEntity());
@@ -106,6 +109,7 @@ public class JdbcRepositoryPropertyConversionIntegrationTests {
}
@Test // DATAJDBC-95
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void existsById() {
EntityWithColumnsRequiringConversions entity = repository.save(createDummyEntity());
@@ -114,6 +118,7 @@ public class JdbcRepositoryPropertyConversionIntegrationTests {
}
@Test // DATAJDBC-95
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void findAllById() {
EntityWithColumnsRequiringConversions entity = repository.save(createDummyEntity());
@@ -122,6 +127,7 @@ public class JdbcRepositoryPropertyConversionIntegrationTests {
}
@Test // DATAJDBC-95
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void deleteAll() {
EntityWithColumnsRequiringConversions entity = repository.save(createDummyEntity());
@@ -132,6 +138,7 @@ public class JdbcRepositoryPropertyConversionIntegrationTests {
}
@Test // DATAJDBC-95
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void deleteById() {
EntityWithColumnsRequiringConversions entity = repository.save(createDummyEntity());
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithCollectionsIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithCollectionsIntegrationTests.java
index 38bb8ef48..5aafde897 100644
--- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithCollectionsIntegrationTests.java
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithCollectionsIntegrationTests.java
@@ -37,6 +37,7 @@ import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
+import org.springframework.test.annotation.IfProfileValue;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@@ -46,6 +47,7 @@ import org.springframework.transaction.annotation.Transactional;
* Very simple use cases for creation and usage of JdbcRepositories.
*
* @author Jens Schauder
+ * @author Thomas Lang
*/
@ContextConfiguration
@Transactional
@@ -134,6 +136,7 @@ public class JdbcRepositoryWithCollectionsIntegrationTests {
}
@Test // DATAJDBC-113
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void updateSet() {
Element element1 = createElement("one");
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithListsIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithListsIntegrationTests.java
index cbf30207b..752fc7c6d 100644
--- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithListsIntegrationTests.java
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithListsIntegrationTests.java
@@ -37,6 +37,7 @@ import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
+import org.springframework.test.annotation.IfProfileValue;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@@ -46,6 +47,7 @@ import org.springframework.transaction.annotation.Transactional;
* Very simple use cases for creation and usage of JdbcRepositories for Entities that contain {@link List}s.
*
* @author Jens Schauder
+ * @author Thomas Lang
*/
@ContextConfiguration
@Transactional
@@ -134,6 +136,7 @@ public class JdbcRepositoryWithListsIntegrationTests {
}
@Test // DATAJDBC-130
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void updateList() {
Element element1 = createElement("one");
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithMapsIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithMapsIntegrationTests.java
index 0a08cd1c1..70ede7515 100644
--- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithMapsIntegrationTests.java
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryWithMapsIntegrationTests.java
@@ -36,6 +36,7 @@ import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
+import org.springframework.test.annotation.IfProfileValue;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
@@ -45,6 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
* Very simple use cases for creation and usage of JdbcRepositories for Entities that contain {@link java.util.Map}s.
*
* @author Jens Schauder
+ * @author Thomas Lang
*/
@ContextConfiguration
@Transactional
@@ -133,6 +135,7 @@ public class JdbcRepositoryWithMapsIntegrationTests {
}
@Test // DATAJDBC-131
+ @IfProfileValue(name = "spring.profiles.active", values = {"mysql", "postgres", "mariadb", "default"}) // DATAJDBC-278
public void updateMap() {
Element element1 = createElement("one");
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/MsSqlDataSourceConfiguration.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/MsSqlDataSourceConfiguration.java
new file mode 100644
index 000000000..edb644768
--- /dev/null
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/MsSqlDataSourceConfiguration.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2017-2018 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springframework.data.jdbc.testing;
+
+import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.testcontainers.containers.MSSQLServerContainer;
+
+import javax.sql.DataSource;
+
+
+/**
+ * {@link DataSource} setup for PostgreSQL.
+ *
+ * Configuration for a MSSQL Datasource.
+ *
+ * @author Thomas Lang
+ * @see
+ */
+@Configuration
+@Profile({"mssql"})
+public class MsSqlDataSourceConfiguration extends DataSourceConfiguration {
+
+ private static final MSSQLServerContainer mssqlserver = new MSSQLServerContainer();
+
+ static {
+ mssqlserver.start();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.springframework.data.jdbc.testing.DataSourceConfiguration#createDataSource()
+ */
+ @Override
+ protected DataSource createDataSource() {
+ SQLServerDataSource sqlServerDataSource = new SQLServerDataSource();
+ sqlServerDataSource.setURL(mssqlserver.getJdbcUrl());
+ sqlServerDataSource.setUser(mssqlserver.getUsername());
+ sqlServerDataSource.setPassword(mssqlserver.getPassword());
+ return sqlServerDataSource;
+ }
+}
diff --git a/spring-data-jdbc/src/test/resources/container-license-acceptance.txt b/spring-data-jdbc/src/test/resources/container-license-acceptance.txt
new file mode 100644
index 000000000..b546fb081
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/container-license-acceptance.txt
@@ -0,0 +1 @@
+microsoft/mssql-server-linux:2017-CU6
\ No newline at end of file
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.core/AggregateTemplateIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.core/AggregateTemplateIntegrationTests-mssql.sql
new file mode 100644
index 000000000..12d81c9a4
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.core/AggregateTemplateIntegrationTests-mssql.sql
@@ -0,0 +1,15 @@
+DROP TABLE IF EXISTS LEGO_SET;
+DROP TABLE IF EXISTS MANUAL;
+CREATE TABLE LEGO_SET ( id BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(30));
+CREATE TABLE MANUAL ( id BIGINT IDENTITY PRIMARY KEY, LEGO_SET BIGINT, ALTERNATIVE BIGINT, CONTENT VARCHAR(2000));
+ALTER TABLE MANUAL ADD FOREIGN KEY (LEGO_SET) REFERENCES LEGO_SET(id);
+
+DROP TABLE IF EXISTS ONE_TO_ONE_PARENT;
+DROP TABLE IF EXISTS Child_No_Id;
+CREATE TABLE ONE_TO_ONE_PARENT ( id BIGINT IDENTITY PRIMARY KEY, content VARCHAR(30));
+CREATE TABLE Child_No_Id (ONE_TO_ONE_PARENT BIGINT PRIMARY KEY, content VARCHAR(30));
+
+DROP TABLE IF EXISTS LIST_PARENT;
+DROP TABLE IF EXISTS element_no_id;
+CREATE TABLE LIST_PARENT ( id BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));
+CREATE TABLE element_no_id ( content VARCHAR(100), LIST_PARENT_key BIGINT, LIST_PARENT BIGINT);
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository.config/EnableJdbcRepositoriesIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository.config/EnableJdbcRepositoriesIntegrationTests-mssql.sql
new file mode 100644
index 000000000..f9407ad2d
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository.config/EnableJdbcRepositoriesIntegrationTests-mssql.sql
@@ -0,0 +1,2 @@
+DROP TABLE IF EXISTS Dummy_Entity;
+CREATE TABLE Dummy_Entity ( id BIGINT IDENTITY PRIMARY KEY);
\ No newline at end of file
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryIdGenerationIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryIdGenerationIntegrationTests-mssql.sql
new file mode 100644
index 000000000..4be191bdd
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryIdGenerationIntegrationTests-mssql.sql
@@ -0,0 +1,5 @@
+DROP TABLE IF EXISTS ReadOnlyIdEntity;
+DROP TABLE IF EXISTS PrimitiveIdEntity;
+
+CREATE TABLE ReadOnlyIdEntity (ID BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));
+CREATE TABLE PrimitiveIdEntity (ID BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryIntegrationTests-mssql.sql
new file mode 100644
index 000000000..937a66f1c
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryIntegrationTests-mssql.sql
@@ -0,0 +1,2 @@
+DROP TABLE IF EXISTS dummy_entity;
+CREATE TABLE dummy_entity (id_Prop BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryManipulateDbActionsIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryManipulateDbActionsIntegrationTests-mssql.sql
new file mode 100644
index 000000000..45ef8bd9a
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryManipulateDbActionsIntegrationTests-mssql.sql
@@ -0,0 +1,4 @@
+DROP TABLE IF EXISTS dummy_entity;
+DROP TABLE IF EXISTS log;
+CREATE TABLE dummy_entity ( id BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100), DELETED CHAR(1), log BIGINT);
+CREATE TABLE log ( id BIGINT, TEXT VARCHAR(100));
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryPropertyConversionIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryPropertyConversionIntegrationTests-mssql.sql
new file mode 100644
index 000000000..0a420bdf9
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryPropertyConversionIntegrationTests-mssql.sql
@@ -0,0 +1,2 @@
+DROP TABLE IF EXISTS ENTITY_WITH_COLUMNS_REQUIRING_CONVERSIONS;
+CREATE TABLE ENTITY_WITH_COLUMNS_REQUIRING_CONVERSIONS ( id_Timestamp DATETIME PRIMARY KEY, bool bit, SOME_ENUM VARCHAR(100), big_Decimal DECIMAL(38), big_Integer DECIMAL(20), date DATETIME, local_Date_Time DATETIME, zoned_Date_Time VARCHAR(30));
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithCollectionsIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithCollectionsIntegrationTests-mssql.sql
new file mode 100644
index 000000000..bc0abc14c
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithCollectionsIntegrationTests-mssql.sql
@@ -0,0 +1,4 @@
+DROP TABLE IF EXISTS dummy_entity;
+DROP TABLE IF EXISTS element;
+CREATE TABLE dummy_entity ( id BIGINT identity PRIMARY KEY, NAME VARCHAR(100));
+CREATE TABLE element (id BIGINT identity PRIMARY KEY, content VARCHAR(100), dummy_entity BIGINT);
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithCollectionsNoIdIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithCollectionsNoIdIntegrationTests-mssql.sql
new file mode 100644
index 000000000..3d2cd82c2
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithCollectionsNoIdIntegrationTests-mssql.sql
@@ -0,0 +1,4 @@
+DROP TABLE IF EXISTS dummy_entity;
+DROP TABLE IF EXISTS element;
+CREATE TABLE dummy_entity ( id BIGINT identity PRIMARY KEY, NAME VARCHAR(100));
+CREATE TABLE element (content VARCHAR(100), dummy_entity BIGINT);
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithListsIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithListsIntegrationTests-mssql.sql
new file mode 100644
index 000000000..a8d4104d4
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithListsIntegrationTests-mssql.sql
@@ -0,0 +1,4 @@
+DROP TABLE IF EXISTS dummy_entity;
+DROP TABLE IF EXISTS element;
+CREATE TABLE dummy_entity ( id BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));
+CREATE TABLE element (id BIGINT IDENTITY PRIMARY KEY, content VARCHAR(100), Dummy_Entity_key BIGINT,dummy_entity BIGINT);
diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithMapsIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithMapsIntegrationTests-mssql.sql
new file mode 100644
index 000000000..01ba3be52
--- /dev/null
+++ b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/JdbcRepositoryWithMapsIntegrationTests-mssql.sql
@@ -0,0 +1,4 @@
+DROP TABLE IF EXISTS dummy_entity;
+DROP TABLE IF EXISTS element;
+CREATE TABLE dummy_entity ( id BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));
+CREATE TABLE element (id BIGINT IDENTITY PRIMARY KEY, content VARCHAR(100), Dummy_Entity_key VARCHAR(100),dummy_entity BIGINT);