I have used hibernate reverse engineering to generate my model and Dao classes i am using hibernate criteria API to retrive values from database
criteria.add(Restrictions.eq(
"propert1.propert2.StateId", 1));
i am getting the following exception
javax.faces.el.EvaluationException: org.hibernate.QueryException: could not resolve property: propert1.propert2.StateId of: com.packagename.
Has any body got the clue why is this happening.(create criteria has the class which has property1 and class of propert1 have propert2 )