title: How to use the exists keyword in Spring Data to check for the existence of an entity?
body: <p>How do I use the 'exists' keyword in Spring Data in a query method?</p>
  
  <p>I would like to have a method like this:</p>
  
  <pre><code>public interface ProfileRepository extends JpaRepository&lt;Profile, Long&gt; {
    boolean existsByAttribute(String attribute);
  }
  </code></pre>
  
  <p>where <em>Attribute</em> is a field of the <em>Profile</em>.</p>
  
  <p>A workaround would be to use a <a href="http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/#repositories.custom-implementations">custom-implementation</a>. But the <a href="http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/#d0e1910">appendix</a> defines exists as keyword. Could someone give me an example how to use this keyword?</p>