title: How to select only month in JPA
body: <p>i have trouble with select only month or year in JPA</p>
  
  <p>in mysql i write statement follow:</p>
  
  <pre><code>select * from table where Month(date) = 12 ;
  </code></pre>
  
  <p>and in entity bean i write follow:</p>
  
  <pre><code>select t from table t where Month(t.date) = 12;
  </code></pre>
  
  <p>but it throw Error !!</p>
  
  <p>PS: sorry i can't attach my stacktrace because i'm not at home :D</p>