Closed
Description
First of all, this is not a bug.
In the class Neo4jQuerySupport
is the next line:
REPOSITORY_QUERY_LOG.warn("Do not use `null` as a property value for comparison."
+ " It will always be false and return an empty result.");
This warning is triggered every time that the query has a null
parameter. Even when these parameters are to set a null
value in a property.
I have a @Query
when $result
can be null
. This query is executed 200k/day so you can imagine my log file 😅
SET rel.teamId = $teamId, rel.result = $result
Today, I have two workarounds:
- Configure the logs to exclude
Neo4jQuerySupport
warnings. - Create an alternative
@Query
withSET rel.teamId = $teamId
in the cases the $result isnull
.
But I ask myself if this warning makes sense. When you're writing a query, it's assumed that you have to test it.
Thanks!