How to map timestamp column to JPA type?

后端 未结 4 1706
半阙折子戏
半阙折子戏 2021-01-04 18:15

I\'m using Play! 1.2.4 and PostgreSQL 9.1. I created a table with a created_at column, of type: timestamp without time zone. It has a default val

4条回答
  •  情书的邮戳
    2021-01-04 18:27

    Try this:

    @Column(name="create_at", insertable=false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date createAt;
    

提交回复
热议问题