kikione
V2EX  ›  问与答

JPA 动态查询时,数据库存的时间是 String, 如何改成 Datetime

  •  
  •   kikione · Apr 22, 2021 · 1310 views
    This topic created in 2019 days ago, the information mentioned may be changed or developed.

    Predicate startTime = criteriaBuilder.greaterThanOrEqualTo(root.get("tranDate").as(String.class),date);

    这个 tranDate 是 String 类型,我怎么写,让 jpa 在查询的时候为 Date 类型。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1202 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 22:21 · PVG 06:21 · LAX 14:21 · JFK 17:21
    ♥ Do have faith in what you're doing.