the hibernate JavaDoc says this about readClass(..):
Quote:
Read a mapping from an application resource, using a convention. The class foo.bar.Foo is mapped by the file foo/bar/Foo.hbm.xml.
So if you want o read the mapping document from another location than the convention try to use this method:
Code:
config.addFile(<path to file>)
Read mappings from a particular XML file
If all of your mapping documents are in the same diretory you can use:
Code:
config.addDirectory(<Diretory with the mappings>)
Read all mapping documents from a directory tree. Assume that any file named *.hbm.xml is a mapping document.
Good Luck!