title: Could not resolve property: <"username"> of: com.education.library.model.Customer
body: <p>I'm trying to write a search, using Hibernate that would run search on two types of vatiables.I have a model Customer, that has properties: Id, name, username,password, genre are String, and int.
  I have created "<strong>customerlDao</strong>" and "<strong>customerDaoImpl</strong>". These are given below,.</p>
  
  <p>public interface CustomerDao {</p>
  
  <pre><code>public Customer validateUser(String username, String password);
  </code></pre>
  
  <p>}</p>
  
  <pre><code>@Override
  public Customer validateUser(String username, String password) {
      Criteria criteria = getSession().createCriteria(Customer.class);
      Customer customer = (Customer) criteria.add(Restrictions.eq(username, password)).uniqueResult();
      return customer;
  }
  </code></pre>
  
  <p>but, Its not working,. The Error message "Could not resolve property: &lt;"username"> of: com.education.library.model.Customer" How I change it..</p>