kikione
V2EX  ›  问与答

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

  •  
  •   kikione · Apr 22, 2021 · 960 views
    This topic created in 1852 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   ·   5278 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 08:42 · PVG 16:42 · LAX 01:42 · JFK 04:42
    ♥ Do have faith in what you're doing.