title: Spring Data - Customer @Query with no property matching
body: <p>I'm trying to set up a custom @Query that is not automatically generated, but no matter what I try it is trying to match properties in the method name to those in my returning object.</p>
  
  <p>How can I run through this query without it trying to build the query, and fail with a org.springframework.data.mapping.PropertyReferenceException? Perhaps @Query is the wrong annotation?</p>
  
  <p>My repo currently looks like this:</p>
  
  <pre><code>@Repository
  public interface ScheduleRepository extends CrudRepository&lt;Schedule, Integer&gt;
  {
      @Query
      List&lt;Schedule&gt; findByTypeAndAirDateBetweenOrderByAirDateDesc(String type, Date startDate, Date endDate);
  
      @Query("SELECT s FROM Schedule s WHERE s.type = 'A' AND (s.airDate BETWEEN :startDate AND :endDate) ORDER BY ABS(DATEDIFF(s.airDate, NOW())) LIMIT 1")
      List&lt;Schedule&gt; findCurrentAd(Date startDate, Date endDate);
  }
  </code></pre>
  
  <p>The exception occurs when it cannot find a matching 'current' field in my Schedule class. I don't want it to. I just want it to run the query as I've defined it, no questions asked.</p>
  
  <p>As you've probably discerned, I'm new to Spring MVC &amp; Data.</p>
  
  <p>Thanks for anyone's help!</p>