Description
Using CURRENT_DATE as argument in queries for LocalDateTimeFields yields a
org.apache.openjpa.persistence.ArgumentException: Attempt to compare incompatible types "class java.time.LocalDateTime" and "class java.util.Date".
Field in entity:
@NotNull
@Column(name = "USEDUNTIL", nullable = false)
private LocalDateTime usedUntil;
Example Query:
@NamedQuery(name = QUERY_COUNT_BY_IDS,
query = "SELECT COUNT(t) FROM Dokumente t WHERE t.dokumentId IN :dokumentId AND t.usedUntil >= CURRENT_DATE")