find below my HQL query
Query query = session.createQuery(\"select u from UserLog u where u.userLogSerialno = \" + \"(select max(uu.userLogSerialno) from Us
Simple example:
Integer id = 1; Query query = session.createQuery("from Employee e where e.idEmployee=:id"); query.setParameter("id", id);