kikione
V2EX  ›  问与答

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

  •  
  •   kikione · Apr 22, 2021 · 1179 views
    This topic created in 1956 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   ·   5542 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 07:46 · PVG 15:46 · LAX 00:46 · JFK 03:46
    ♥ Do have faith in what you're doing.