It all depends on the version of Hibernate that you are using. The latest versions of Hibernate (3.x) no longer provide this find method. It has been deprecated. The
Hibernate 3 migration guide mentions this:
Certain redundant methods were deprecated and removed from the org.hibernate.Session interface. However, to make migration easier, these methods are still available, via the org.hibernate.classic.Session subinterface. These deprecated methods are:
- query execution methods: find(), iterate(), filter(), delete()
- saveOrUpdateCopy()
Hibernate3 applications should use createQuery() for all query execution, DELETE queries for bulk delete and merge() instead of saveOrUpdateCopy(). Existing applications may continue to use the deprecated methods.