Looking at the documentation for Hibernate 3 and even 4 as well, it seems that one has to create the mapping classes before hand.
All those classes defined in hibernate.cfg.xml
or hibernate.properties
files are loaded as soon as the configuration is loaded and then any changes to these files will be ignored by hibernate.
Is there any way to add mapping classes at runtime dynamically?