Part 1:
I have a model.hbm.xml file that is often update, which currently requires a full project build and deployment whenever it is modified.
Can I break this out, so that the model.hbm.xml is read from the file-system, or a remote location (i.e. \file server\C$\Path\To\Hibernate\Mappings) when the application starts?
Currently I'm loading it from persistence.xml with <mapping-file>model.hbm.xml</mapping-file>
Part 2:
What I really want is to load all *.hbm.xml files from a specified directory when the application starts.
Is there any wildcard/directory support for loading hibernate mappings?
Update:
I've found a semi-solution to loading the mapping-file from a remote location
<mapping-file>file:////FileServerIP/path/to/hbm/model.hbm.xml</mapping-file>
Allows me to store the mapping file outside of the build, in a place where all servers have access.
I would like to implement this using a .properties file, so that the FileServerIP can be independent of the build as well. I haven't found out how to do that yet.
My simple attempts at loading directories/wildcards have also been unfruitful.
<mapping-file>file:////FileServerIP/path/to/hbm/*.hbm.xml</mapping-file>
<mapping-file>file:////FileServerIP/path/to/hbm/</mapping-file>
Both failed to load the model.hbm.xml file.