Open timyates opened 5 months ago
We don’t support expressions in the queries
@dstepanov Any particular reason? It seems to be at least partially supported, as we are using these property injections in our queries across our application and they only fail to work in this case. Perhaps this lack of support should be documented somewhere? It doesn't seem to be stated in either the javadoc or the guides that I can find.
This non-IN query works with the parameter injected... is that by luck more than design?
Because for this case, we have to generate the query at the runtime, and to make it easy, we split it into parts at the compilation time, and that breaks the expressions
Expected Behavior
Writing an
IN
@Query
with properties injected (such as"SELECT name, '${property.value}' as property_value FROM data WHERE id IN (:id)"
) should work as with other non-IN queriesActual Behaviour
We get an exception
Steps To Reproduce
Pull the reproducer and run
./gradlew test
. The first test fails, but the workaround (using@ParameterExpression
) worksEnvironment Information
OSX, Java 17
Example Application
https://github.com/bloidonia/data-query-parameter-issue/blob/main/src/test/java/data/query/parameter/issue/DataQueryParameterIssueTest.java
Version
4.4.2