I am using the below method to query using Spring Data JPA.
findByUpdatedGreaterThanAndFromEmailOrToEmailInOrderByUpdatedAsc(final long updated, final String email, final String to);
The query is always passes because of the OR condition.
My intention was findBy(UpdatedGreaterThan)And(FromEmailOrToEmailIn)OrderByUpdatedAsc
Is there anyway to do the same in Spring Data JPA.