With HQL, you should reference entities instead of tables. So, it should be Employeenam
instead of employee
. If you're setting parameters to the query, you should also be using them in the query, making reference to the property names, according to the getters/setters (for instance, empSalary
).
Try to write your query like this:
from Employeenam
where empname = :name
and empid = :id
and empsalary = :salary
and empjob = :empjob
Also, you might consider changing your property names to match the getters/setters. If the property is called id
, the corresponding getter/setter should be getId()
/setId(id)
.