I have a controller method for searching like so
@RequestMapping(method = RequestMethod.GET)
public Page<MyEntity> find(@QuerydslPredicate(root = MyEntity.class) Predicate predicate,
Pageable pageable) {
return this.myEntityRepository.findAll(predicate, pageable);
}
It works great. I can issue a GET
request with various query string parameters, and it filters accordingly, but now I want to search by null. I tried doing something like /myentity?myParam1=&
, but the predicate
argument is always null
.
How can I search where specific fields are null?
I also posted this on SO.