i am new to hibernate. i need to understand the following questions :
(1) What is subselect in hibernate mapping?
(2) How to map subselect in hbm file?
Actually you don't need to model subselects, you can create queries that uses them. Check: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-subqueries
(Edit: example from the link above)
String hql = "from Cat as fatcat "+
"where fatcat.weight > ( "+
" select avg(cat.weight) from DomesticCat cat "+
")";
List fatcats = session.createQuery(hql);