【发布时间】:2021-07-29 04:26:05
【问题描述】:
我在 Spring Boot 应用程序中有以下 SQL 查询。该查询位于@NamedNativeQuery 注释内:
"SELECT s.libraryid, r.run_date, COUNT(*), MEDIAN(s.mean_depth) " +
"FROM r, s " +
"WHERE r.runid = s.runid " +
"GROUP BY s.libraryid, r.run_date " +
"ORDER BY r.run_date, s.libraryid"
应用程序崩溃并出现以下异常:
org.hibernate.MappingException: No Dialect mapping for JDBC type: 100
在 application.properties 文件中,Hibernate 是这样配置的:
# Hibernate config
spring.jpa.database-platform=org.hibernate.dialect.Oracle12cDialect
在我引入 MEDIAN 函数之前,查询运行良好。我一直无法找到 JDBC Type 100 是什么。有人知道吗?
非常感谢。
【问题讨论】:
-
s.mean_depth列使用什么类型? -
@SternK :我使用 float
标签: java spring hibernate jdbc