The largest Interview Solution Library on the web


Hibernate Tutorials/
« Previous | 1 | 2 | 3 | Next »
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();
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com