Does Spring Data query creation supports IsTrue/False in the query creation?
I found this section http://docs.spring.io/spring-data/jpa/docs/1.0.0.M1/reference/html/#jpa.query-methods.query-creation in an older version documentation, but I cannot find something similar for the latest version.
Yes, simply use IsTrue or IsFalse your repository methods:
interface PersonRepository extends Repository<Person, Long> {
Iterable<Person> findByActiveIsTrue();
}
This is also listed in the keywords section of the reference documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With