title: Not equal query in hql not work
body: <p>I am tring the 'not equal' query in hql.</p>
  
  <pre><code> @Override
      public Student findStudentsByYear(String year) {
          String queryString = "from Student where year&lt;&gt;:year ";
          Query query =   sessionFactory.getCurrentSession().createQuery(queryString);        
          query.setParameter("year", year);
          return (Student)query.uniqueResult();
      }
  </code></pre>
  
  <p>but it is not working properly.How to write this query correctly</p>
  
  <p>My student table is</p>
  
  <pre><code>+-------------+--------------+------+-----+---------+----------------+
  | Field       | Type         | Null | Key | Default | Extra          |
  +-------------+--------------+------+-----+---------+----------------+
  | studentId   | bigint(20)   | NO   | PRI | NULL    | auto_increment |
  | course      | varchar(255) | YES  |     | NULL    |                |
  | dob         | varchar(255) | YES  |     | NULL    |                |
  | email       | varchar(255) | YES  |     | NULL    |                |
  | faculty     | varchar(255) | YES  |     | NULL    |                |
  | firstName   | varchar(255) | YES  |     | NULL    |                |
  | gender      | int(11)      | YES  |     | NULL    |                |
  | homeAddress | varchar(255) | YES  |     | NULL    |                |
  | lastName    | varchar(255) | YES  |     | NULL    |                |
  | linkedIn    | varchar(255) | YES  |     | NULL    |                |
  | university  | varchar(255) | YES  |     | NULL    |                |
  | year        | varchar(255) | YES  |     | NULL    |                |
  | user_userId | bigint(20)   | YES  | MUL | NULL    |                |
  +-------------+--------------+------+-----+---------+----------------+
  </code></pre>