Closed robertandrewbain closed 3 years ago
Is there a workaround for this particular issue?
The current workaround is a cast: (NumberExpression<Long>) someRelationalPathBase.id.coalesce(someOtherRelationalPathBase.id).asNumber()
. Alternatively: Expressions.asNumber(someRelationalPathBase.id.coalesce(someOtherRelationalPathBase.id))
.
ComparableExpressionBase
'spublic final Coalesce<T> coalesce(Expression<?>...exprs)
returns aCoalesce<T>
.Coalesce
does not haveSimpleExpression
'spublic BooleanExpression eq(T right)
method, so I assume the idea is to useCoalesce
'spublic NumberExpression<?> asNumber()
. However if you try to E.G: (I know the query is nonsense)you receive the compiler error
The method eq(capture#2-of ?) in the type SimpleExpression<capture#2-of ?> is not applicable for the arguments (NumberPath<Long>)
. I'm working around this with the following code: