Hello,
I am new to Hibernate. So I want to use the HQL editor in eclipse. My problem is that i have annotations and not xml mappings. So in the hibernate perspective in eclipse, in the New configuration screen I add my hibernate.cfg.xml file and the project. I dont have a .properties file.
I got the following error when I try to issue a simple query
Code:
org.hibernate.hql.ast.QuerySyntaxException: Player is not mapped [select p from Player p]
where Player is a class that uses annotations. Then based on some stuff i found searching i added the following line in the hibernate.cfg.xml file
Code:
<mapping class="com.my.entities.Player"/>
and now I am getting the following error
Code:
org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="com.my.entities.Player"/>
Any suggestions? Thank you