Hibernate: Found: float, expected: double precision

前端 未结 8 1438
清歌不尽
清歌不尽 2020-12-16 21:28

I have a problem with the mapping of Oracle Float double precision datatype to Java Double datatype. The hibernate schema validator seems to fail when the Java Double dataty

8条回答
  •  情书的邮戳
    2020-12-16 21:58

    application.properties

    hibernate.dialect=com.test.config.Oracle10gDialectExtended

    create class

    package com.test.config;
    
    import java.sql.Types;
    
    import org.hibernate.dialect.Oracle10gDialect;
    
    public class Oracle10gDialectExtended extends Oracle10gDialect {
    
        public Oracle10gDialectExtended() {
            registerColumnType(Types.DOUBLE, "float");
        }
    }
    

提交回复
热议问题