-
1. Re: Error after executing HQL-Statement: Entity is not mappe
abhinav19 Jan 3, 2007 3:14 PM (in response to hoeft)i get the same error...
please help -
2. Re: Error after executing HQL-Statement: Entity is not mappe
panchotl Jan 24, 2007 1:15 PM (in response to hoeft)get the same error, but i can mapped a table Persons whit the same project
Can i help me please -
3. Re: Error after executing HQL-Statement: Entity is not mappe
maxandersen Jan 24, 2007 1:25 PM (in response to hoeft)did you map the class?
-
4. Re: Error after executing HQL-Statement: Entity is not mappe
hoeft Jan 26, 2007 3:51 AM (in response to hoeft)map the class? I don't have any xml files which describes how the classes are mapped.
The classes are looking like this:
@Entity
@Table(name = "MyTable")
public class MyClass {
...
}
I have thought that this is enough for the hibernate tools to figure out, how the classes are mapped.
Is this the failure? -
5. Re: Error after executing HQL-Statement: Entity is not mappe
maxandersen Jan 26, 2007 5:34 AM (in response to hoeft)autodiscovery of the entities were just added in the latest hibernate tools release. (beta9)
until then you had to list the classes in hibernate.cfg.xml -
6. Re: Error after executing HQL-Statement: Entity is not mappe
hoeft Jan 26, 2007 6:02 AM (in response to hoeft)Ok, thank you. I'll try the newest release then.
But for the case that it doesn't work:
Is it possible to create the mappings in the hibernate.cfg.xml file automatically? It would be really labour-intensive to create the mappings for my 50 entities by hand .... -
7. Re: Error after executing HQL-Statement: Entity is not mappe
maxandersen Jan 26, 2007 6:10 AM (in response to hoeft)....to do it automatically we would need autodiscovery....thus if we had autodiscovery we don't need to list them....hence beta9 ;)
but otherwise doing a list of all your entities (e.g. by piping a dir mymodel > entities.txt) and then do a regular exp search and replace to transform it into the proper <mapping ...> format would get you a long way ;) -
8. Re: Error after executing HQL-Statement: Entity is not mappe
hoeft Jan 26, 2007 10:26 AM (in response to hoeft)Thank your very very much!!!
It works :-))))))))