Query by Boolean properties in spring-data-jpa without using method parameters
The JPA repository section query creation has the following methods.
True findByActiveTrue() … where x.active = true
False findByActiveFalse() … where x.active = false
My guess would be to use
@Query
public Iterable<Entity> findByEnabledTrue();
The @Query
anotation can even be skipped. So it should just work just like this:
public Iterable<Entity> findByEnabledTrue();