What is the use of the @Temporal annotation in Hibernate?

前端 未结 7 926
北海茫月
北海茫月 2020-11-30 18:06

The Hibernate Documentation has the information below for the @Temporal annotation:

In plain Java APIs, the temporal precision of time is

相关标签:
7条回答
  • 2020-11-30 18:43

    use this

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="create_date")
    private Calendar createDate;
    
    public Calendar getCreateDate() {
        return createDate;
    }
    
    public void setCreateDate(Calendar createDate) {
        this.createDate = createDate;
    }
    
    0 讨论(0)
提交回复
热议问题