I'm using redis as my secondary db in my spring application and i need to get all records that have null values for certain attributes. I create query in repository to achieve that.
method
findAllByCars(Integer c);
it works when using with integer as the param but when i use it to find all records that Cars is null.
repo.findAllByCars(null)
it's gives below error in stack trace.
rg.springframework.data.keyvalue.core.UncategorizedKeyValueException: nested exception is java.lang.NullPointerException
at org.springframework.data.keyvalue.core.KeyValuePersistenceExceptionTranslator.translateExceptionIfPossible(KeyValuePersistenceExceptionTranslator.java:49)
at org.springframework.data.keyvalue.core.KeyValueTemplate.resolveExceptionIfPossible(KeyValueTemplate.java:484)
at org.springframework.data.keyvalue.core.KeyValueTemplate.execute(KeyValueTemplate.java:379)
at org.springframework.data.keyvalue.core.KeyValueTemplate.find(KeyValueTemplate.java:390)
Anyone can help this with?.