I want to have a filter query using spring data JPA. condition is something like this:
(A or B or C) and D
when I want to use Spring Data JPA I should change it to be like below (The precedence order is And then Or, just like Java.):
(A and D) or (B and D) or (C and D)
the code in the Spring Repository class is:
Page<SystemEntity> findByNameContainsAndFlagIsFalseOrFamilyContainsAndFlagIsFalseOrEmailContainsAndFlagIsFalse(String name, String family ,String email, Pageable pageable);
you can see that the D condition at the above line "AndFlagIsFalse" is repeated 3 times.
is there any way to implement using a shorter format like "(A or B or C) and D"?