title: Supported keywords inside method names in Spring JPA
body: <p>How do I write the method name for the below query:</p>
  
  <pre><code>@Query("SELECT r.skill, r.rating, count(r) FROM AssociateRating r "
      + "where updatedTime = ( select max(updatedTime) from AssociateRating a "
      + "where r.associate = a.associate ) GROUP BY r.skill, r.rating")
  List&lt;Object[]&gt; findCountMostRecent();
  </code></pre>
  
  <p>Please find below the model:</p>
  
  <pre><code>@Entity
  @Table(name = "associate_ratings")
  public class AssociateRating {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private long id;
  
      private String associate;
  
      @ManyToOne
      @JoinColumn(name = "skill_id")
      private Skill skill;
  
      private int rating;
  
      @Temporal(TemporalType.TIMESTAMP)
      @Column(name = "updated_time")
      private Date updatedTime;
  
  
      public long getId() {
          return id;
      }
  
      public void setId(long id) {
          this.id = id;
      }
  
      public String getAssociate() {
          return associate;
      }
  
      public void setAssociate(String associate) {
          this.associate = associate;
      }
  
      public Skill getSkill() {
          return skill;
      }
  
      public void setSkill(Skill skill) {
          this.skill = skill;
      }
      public int getRating() {
          return rating;
      }
  
      public void setRating(int rating) {
          this.rating = rating;
      }
  
      public Date getUpdatedTime() {
          return updatedTime;
      }
  
      public void setUpdatedTime(Date updatedTime) {
          this.updatedTime = updatedTime;
      }
  }
  
  
  /**
   * Skill Model
   */
  @Entity
  @Table(name = "skills")
  public class Skill {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private int id;
  
      private String name;
  
       public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
  }
  </code></pre>
  
  <p>I am getting exception when trying to extract records from associate_ratings
  com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'updatedTime' in 'where clause'</p>
  
  <p>Could you please advise what is wrong here?
  Could you also please let me know how do we name Spring JPA findXX methods in such cases?</p>