How can I use DB side default value while use Hibernate save?

后端 未结 3 524
说谎
说谎 2020-12-04 15:50

I have a column in DB with default value as sysdate. I\'m looking for a way to get that default value inserted while I\'m not giving anything to corresponding p

3条回答
  •  时光取名叫无心
    2020-12-04 16:14

    Or you can initialize the property of the POJO directly e.g:

    //java code property declaration
    
    private String surname = "default";
    

提交回复
热议问题