I have read some posts on having null values in repository requests, but they are all years old. So I ask this question to get the current state of the problem.
What I am exactly talking about:
I want to have a JPA request with optional null values. A function in my repository would look like this:
public List<MyClass> filter(Integer param);
So that I can omit the parameter in the filter like this: (part of @Query)
(:param IS NULL OR param=:param)
This only works as long as my param is not NULL.
Pls note that I am using a native query here. (JPA implementation is Hibernate, DB is postgres)
Thanks in advance for every update!