You will use FROM clause if you want to load a complete persistent objects into memory. Following is the simple syntax of using FROM clause:
String hql ="FROM Employee";
Query query =session.createQuery(hql); List results =query.list(); If you need to fully qualify a class name in HQL, just specify the package and class name as follows:
String hql ="FROM com.hibernatebook.criteria.Employee";
Query query =session.createQuery(hql); List results =query.list(); |