What is the JPA / Hibernate mapping for ORACLE NUMBER column to a Double typed property

Solution Verified - Updated -

Issue

  • Is it possible to map a NUMBER(38,6) to Double java property? When I try it, following error is raised when schema validator executes

    javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: THS_CHARGE_THRESHOLD, expected: double precision
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
    

Environment

  • Hibernate
  • Java Persistence API (JPA)
  • Oracle

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content