Return Boolean Value from Spring Data JPA Query
Did you know that you can return a boolean value from a Spring Data JPA query? For instance, you may want to know whether or not an entity (i.e. database row) exists with a given value for a field. Surely one could simply return the row count and check if it is larger than zero, but… read more