Hi!
I have to map my entity-classes from and to xml files. The export works fine, but the import doesn't :-(.
My mapping file looks like this:
Code:
<hibernate-mapping>
<class
name="mypackage.MyClass"
table="MyClass" node="WWW">
....
I'm allways getting a "org.hibernate.MappingException: Unknown entity: WWW" if I try to import MyClass entities with the following statement:
Code:
xmlSession.saveOrUpdate(o);
The import works fine if I try this statement:
Code:
xmlSession.saveOrUpdate(MyClass.class.getCanonocalName(),o);
It looks like hibernate only cares about the node (it defines that MyClass is mapped as XXX in xml-files) attribute in my hbm.xml file during the export und ignores it during the import. Is it a bug or am I am doing something wrong?
Thanks for help
Hoeft