Using JPA/Hibernate Criteria to pull between a date

前端 未结 4 1304
清歌不尽
清歌不尽 2020-12-08 06:02

I am trying to using the following code to pull a list of Experience objects from a MySQL table. Each experience has a from datetime column and a t

4条回答
  •  悲哀的现实
    2020-12-08 06:27

    You should switch your arguments:

    builder.between(root.get("dateColumn"), startDate, endDate);
    

提交回复
热议问题