title: Column does not exist in spring boot Postgres app
body: <p>Hi in my spring boot postgresql application, when i retrieve all record using DAO it show column does not exists.</p>
  
  <p><strong>ERROR</strong></p>
  
  <pre><code>WARN : org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 42703
  ERROR: org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ERROR: column merchantit0_.id does not exist
    Position: 8
  ERROR: org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/customerplus].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/customerplus] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
  org.postgresql.util.PSQLException: ERROR: column merchantit0_.id does not exist
    Position: 8
  </code></pre>
  
  <p><strong>Entity Domain</strong></p>
  
  <pre><code>@Entity
  @Table(name = "merchant_item_category")
  public class MerchantItemCategory{
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      @Column(name = "id", nullable = false, length = 11)
      private long id;
      @ManyToOne
      @JoinColumn(name = "merchant_id", nullable = false)
      private Merchant merchant;
      // getters and setters
  }
  </code></pre>
  
  <p><strong>DAO</strong> </p>
  
  <pre><code>public List&lt;MerchantItemCategory&gt; getAllMerchantItemCategoryByMerchantId(long id) {
          Session session=getSession();
          List&lt;MerchantItemCategory&gt;itemCategories=session.createQuery("from MerchantItemCategory where merchant.id=:merchantId and isDelete='0' order by categoryName asc")
                  .setParameter("merchantId", id)
                  .list();
          return itemCategories;
      }
  </code></pre>
  
  <p>I just checked every object and it is correct, But how this error occurring..!</p>