posted 12 years ago
i am getting this error when trying to query a basic table using hibernate.
org.springframework.orm.hibernate3.HibernateQueryException: products is not mapped [from products]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: products is not mapped [from products]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:660)
This is my Product class
This is my sessionFactory configuration
Any idea what I might be missing? I'm guessing it's correct to be using the hibernate name of the table as opposed to the logical name of it in my HQL query? My products class is fully annotated
Update: I used Product ( Table name ) in my HQL and it worked .... now I'm even more puzzled, surely the HQL should use the @hibernate@ mapped table name? ( Sorry, but i think this is now turning into a hibernate question so maybe I should move it? )