I have below parameter which is
Boolean isActive = true/false
I need to pass this parameter in JPA Query.
true = IS NOT NULL
false = IS NULL
@Query("select t from Test t WHERE t.active = ?1")
Optional<Test> findByIds(Boolean isActive);
How can I achieve this, rather than creating 2 separate queries for IS NULL & IS NOT NULL.