Hibernate JPA exception java.sql.SQLException: ORA-00932: data type is inconsistent: should be TIMESTAMP, but got BINARY

The error is as follows

illustrate

The code query is as follows

illustrate

illustrate

Entity is as follows

    //Entity对应的字段如下
    @CreatedDate
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

I checked it on the Internet for a long time. According to the online solution, it doesn’t work. It doesn’t work whether you use between and or greater than less than.

Solution:

I upgraded the springboot version to 2.0.0, and the jpa version was upgraded accordingly. It’s ok for the greater than sign and less than sign. I didn’t try between and, so it should work.

It can be seen that there are bugs in the time handling of versions before 2.0

Hope to help you

I'll use mybatis in the follow-up...

Guess you like

Origin blog.csdn.net/Goligory/article/details/105863866