What are the best workarounds for known problems with Hibernate's schema validation of floating point columns when using Oracle 10g?

前端 未结 4 1925
孤独总比滥情好
孤独总比滥情好 2021-01-07 20:10

I have several Java classes with double fields that I am persisting via Hibernate. For example, I have

@Entity
public class Node ...

  private double value         


        
4条回答
  •  独厮守ぢ
    2021-01-07 20:40

    just adding (columnDefinition = "NUMBER(9,2)") works!

    @Column(name = "CREDIT_AMOUNT", columnDefinition = "NUMBER(9,2)")
    @Basic
    private double creditAmount;
    

提交回复
热议问题