Query qry = session.createQuery("from Person p where p.age>20");
@SuppressWarnings("unchecked")
List <Person>hqlList = qry.list();
if (hqlList != null) {
for (Person personList : hqlList)
System.out.println(" -Using Hibernat hql Age: "
+ personList.getAge());
}
No comments:
Post a Comment