title: Spring data jpa:QuerySyntaxException: department is not mapped
body: <p>I am using spring data jpa.I write a query using @query annotation and trying to fetch all columns in a table but while implementing i am getting error that department table is not mapped.</p>
  
  <p><strong>DepartmentsRepository</strong> </p>
  
  <pre><code> @Repository
      public interface DepartmentsRepository extends JpaRepository&lt;Department, Long&gt; 
      {
          @Query(value = "select d from department d")
          public List&lt;Department&gt; findColumns();
      }
  </code></pre>
  
  <p><strong>Department class</strong></p>
  
  <pre><code>@Entity
  @Table(name="department")
  public class Department 
  {
  @Id
  @Column(name="ndept_id")
  public int ndept_id;
  
  @Column(name="sdept_name")
  public String sdept_name;
  
  @Column(name="ninst_id")
  public int ninst_id;
  
  @Column(name="bis_locked")
  public boolean bis_locked;
  
  @Column(name="sclient_dept_id")
  public String sclient_dept_id;
  
  @Column(name="nsurvey_method_id")
  public  int nsurvey_method_id;
  
  @Column(name="bis_jointuse")
  public boolean bis_jointuse;
  
  @Column(name="ntemp_dept_id")
  public int ntemp_dept_id;
  
  @Column(name="balternate_jointuse_percentage")
  public boolean balternate_jointuse_percentage;
  
  @Column(name="ndiv_id")
  public Integer ndiv_id;
  </code></pre>