JPA 2.0 Oracle DATE has null time

前端 未结 2 1596
太阳男子
太阳男子 2021-02-10 01:31

This seems like such a bonehead question, but I\'ve been chasing my tail around a tree all day. I have a Struts 2 + Spring3/JPA/Hibernate application that inserts a large set in

2条回答
  •  Happy的楠姐
    2021-02-10 01:51

    Use ojdbc6.jar and use the below code against hibernate 3.3 set timestamp instead of java.sql.date or java.util.date

    @Id
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "TDATE", length = 7)
    public Date getTdate() {
        return this.tdate;
    }
    

提交回复
热议问题