How to specify Double's precision on hibernate?

后端 未结 4 713
温柔的废话
温柔的废话 2020-12-08 03:01

I try to create a table from hibernate annotations. I need to have a column of Double type, with the length specified like : (10,2). So SQL syntax show like:



        
4条回答
  •  北荒
    北荒 (楼主)
    2020-12-08 03:17

    @Column(name="Price", columnDefinition="Decimal(10,2) default '100.00'")
    

    Setting default values for columns in JPA

提交回复
热议问题