Exception:Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: -101at org.hibernate.dialect.TypeNames.get(TypeNames.java:71)at org.hibernate.dialect.TypeNames.get(TypeNames.java:103)at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:741)
代码片段:
@Query(value = "select id, age, name, creationDate FROM Person WHERE age=?1", nativeQuery=true)List<PersonView> getPersonsByAge(int age);
和界面:
public interface PersonView {Long getId();Integer getAge();String getName();OffsetDateTime getCreationDate();}
餐桌说明:
Name Null? Type
id NOT NULL NUMBER
age NUMBER
name VARCHAR2(128 CHAR)
creation_date NOT NULL TIMESTAMP(6) WITH TIME ZONE
我尝试将 OffsetDateTime 设置为 ZonedDateTime、Timestamp、String 但没有成功。