Problems building filters using cuba JPQL macros

Hi, I created some navigation screen with native filter from Cuba.
If the screen entity has a transient attribute of type enum, this attribute is populated during execution.
To filter by this attribute I implemented a custom SQL filter based on an expected date and a deadline (number of days).
Each record has a different deadline. and to do the calculation I put a macro in my query: @dateAfter
In the cuba documentation we have this example:
select d from sales_Doc where @dateBefore (d.createTs, now + 1)
in the context of filters would look something like this:
@dateBefore ({E} dateLimit, now + 1)
and in my context it should look like this:
@dateBefore ({E} .dateLimit, now + {E} .deadLine)
but when I apply this filter, I have the following error:
CommonErrorNode [<mismatched token: [@ 184,515: 515 = 'e', ​​<61>, 19:41], resync = e.deadLine>] at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke ( ~ [na: na] at jdk.internal.reflect.GeneratedMethodAccessor197.invoke (Unknown Source) ~ [na: na] at java.base / jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke ( ~ [na: na] at java.base / java.lang.reflect.Method.invoke ( ~ [na: na] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs ( ~ [spring-aop-5.1.6.RELEASE.jar: 5.1.6.RELEASE] at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod ( ~ [spring-aop-5.1.6.RELEASE.jar: 5.1.6.RELEASE]

Hi Amasonas,

Unfortunately, JPQL macros allow only limited expressions, this is mentioned in the @between macro description:

moment1, moment2 – start and end points of the time interval where the value of field_name should fall into. Each of the points should be defined by an expression containing now variable with an addition or subtraction of an integer number.