title: Spring JPA repository transactionality
body: <p>1 quick question on Spring JPA repositories transactionality.
  I have a service that is not marked as transactional and calls Spring JPA repository method</p>
  
  <pre><code>userRegistrationRepository.deleteByEmail(email);
  </code></pre>
  
  <p>And it is defined as</p>
  
  <pre><code>@Repository
  public interface UserRegistrationRepository extends JpaRepository&lt;UserRegistration, Long&gt; {
  
      UserRegistration findByEmail(String email);
  
      void deleteByEmail(String email);
  
  }
  </code></pre>
  
  <p>The problem is that it fails with "<em>No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call; nested exception is javax.persistence.TransactionRequiredException</em>" exception.</p>
  
  <p>Ok, I can solve it by marking the service <strong>or</strong> <em>deleteByEmail(..)</em> method as transactional, but I just can't understand why it crashes now. Spring documentation explicitly states that "<em>CRUD methods on repository instances are transactional by default.</em>" (<a href="http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#transactions" rel="noreferrer">http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#transactions</a>), but apparently this one is not... So Is this statement related to only members of <code>CrudRepository</code>?</p>
  
  <p>ps: that's for Spring Data JPA 1.9.4</p>