I am getting an exception while using a native query nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: -15
my code is
String sqlQuery = "select emp_id, name, address, dept from employee where dept in ( Select dept from department where status=:status)";
Map<String, Object> queryParams = new HashMap<>();
queryParams.put("status", "Active");
Query sqlQuery = entityManager.createNativeQuery(query.toString());
queryParams.forEach(sqlQuery::setParameter);
List queryResults = (List) sqlQuery.getResultList(); // This line is throwing exception
Database I am using is : SQLServer 2012. DB Config is :
spring.datasource.username=testUser
spring.datasource.password=******
spring.datasource.url=jdbc:sqlserver://server:port;databaseName=testDB;
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.datasource.hikari.maximum-pool-size=75
spring.datasource.hikari.idle-timeout=30000
spring.datasource.hikari.minimum-idle=10
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.id.new_generator_mappings=false
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.generate_statistics=false
spring.jpa.properties.hibernate.default_batch_fetch_size=100
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl