Search code examples
javahibernatehqlhibernate-mapping

Java: How to resolve class is not mapped exception in Hibernate Query Language?


While executing the delete query, I am getting "class is not mapped", while I have mapped in hibernate.cfg.xml.

enter image description here


Solution

  • You should not to use a table name in the HQL query, like plan_attribute, but a class name, like PlanAttribute. The same for the property plan_id.