Я попытался найти его, но не смог решить. нужны ваши мысли по этому поводу
Я использую этот NamedQuery для получения результатов от Db.
@NamedQuery(name= "Person.FindByCodeAndFiscalYear",
query="select o from Person o where o.fiscalYear=:pfiscalYear and o.Code=:pCode and (o.desactivatedDate is null or o.desactivatedDate > sysdate)")
здесь я хочу, чтобы столбец desactivateDate был либо null или sysdate
ошибка при компиляции кода:
Caused By: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Problem compiling [select o from Person o where o.fiscalYear=:pfiscalYear and o.Code=:pCode and (o.desactivatedDate is null or o.desactivatedDate > sysdate)].
[144, 151] The identification variable 'sysdate' cannot be used in conjunction with the > operator.
[144, 151] The identification variable 'sysdate' is not defined in the FROM clause.
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildException(HermesParser.java:155)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.validate(HermesParser.java:347)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.populateQueryImp(HermesParser.java:278)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildQuery(HermesParser.java:163)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:142)
at org.eclipse.persistence.internal.jpa.JPAQuery.processJPQLQuery(JPAQuery.java:221)
at org.eclipse.persistence.internal.jpa.JPAQuery.prepare(JPAQuery.java:182)
at org.eclipse.persiste