title: Spring data query where column is null
body: <p>Suppose I have entities (getters/setters and various details omitted for brevity):</p>
  
  <pre><code>@Entity
  class Customer{
      ...
      @OneToMany(cascade = CascadeType.ALL, mappedBy = "customer")
      Collection&lt;Coupon&gt; coupons;
  }
  
  @Entity
  class Coupon{
      ...
      @Temporal(value = TemporalType.TIMESTAMP)
      private Date usedOn;
  
      @ManyToOne(fetch = FetchType.LAZY)
      @NotNull
      Customer customer;
  }
  </code></pre>
  
  <p>I wish retrieve all Coupons for a given Customer having null usedOn.
  I,'ve unsuccessfully defined a method in the CouponRepository as described in <a href="http://docs.spring.io/spring-data/data-commons/docs/current/reference/html/#repositories" rel="noreferrer">docs</a></p>
  
  <pre><code>@Repository
  public interface CouponRepository extends CrudRepository&lt;Coupon, Long&gt; {
       Collection&lt;Coupon&gt; findByCustomerAndUsedOnIsNull(Customer);
  }
  </code></pre>
  
  <p>but this leads on a compiler error <code>Syntax error, insert "... VariableDeclaratorId" to complete FormalParameterList</code>.</p>