kikione
V2EX  ›  问与答

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

  •  
  •   kikione · Apr 22, 2021 · 1170 views
    This topic created in 1950 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   ·   Solana   ·   6068 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 02:28 · PVG 10:28 · LAX 19:28 · JFK 22:28
    ♥ Do have faith in what you're doing.