title: In Spring Data is it possible to delete entities using an entity's unique attribute?
body: <p>Is it possible to delete entities using an entity's unique attribute?</p>
  
  <p>In Spring Data 1.4.3.RELEASE, adding methods to find by unique attributes is very easy but, I haven't found a way to do it with delete.<br><br>
  In the following code, Spring automagically handles the <code>findByAddress</code>, <strong>is there something similar for delete?</strong>
  <br>
  Something like  <code>void deleteByAddress(String hwAddress);</code>, I have added it to <code>TerminalRepository</code> but it doesn't work.</p>
  
  <pre><code>public Terminal {
   @Id
   @GeneratedValue(strategy=GenerationType.AUTO)
   private long id;
   @Column(unique=true)
   private String hwAddress;
   ...
  }
  </code></pre>
  
  <p><br></p>
  
  <pre><code>public interface TerminalRepository extends
      CrudRepository&lt;Terminal, Long&gt; {
  
  Terminal findByAddress(String hwAddress);
  
  }
  </code></pre>
  
  <p>Of course it is possible to find the entity by <code>address</code> and then use the <code>delete(Terminal)</code> method passing the found entity as parameter. But this wouldn't be good in terms of performance as it will be making one unnecessary call to the database database, i.e., one avoidable call to find the object and another one to delete it</p>