Here is an example of my mapping file:
<!-- ============================ -->
<!-- Table TABLE1 -->
<!-- ============================ -->
<class table="TABLE1"
name="com.myCompany.Entity1" lazy="false" schema="SCHEMA1">
<!-- Attributs -->
<id column="ID" name="id" type="string" />
<property column="ACTION_TYPE" name="actionType"
type="com.myCompany.ActionEnumType" not-null="true" />
<property column="PRIORITY" name="priority"
type="com.myCompany.PriorityEnumType" not-null="true" />
<property column="DATE_MAJ" name="dateMaj" />
</class>
<!-- ============================ -->
<!-- Table TABLE2 -->
<!-- ============================ -->
<class table="TABLE2"
name="com.myCompany.Entity2"
lazy="false" schema="SCHEMA2">
<!-- Attributs -->
<id column="ID" name="id" type="string" />
<property column="ACTION_TYPE" name="actionType"
type="com.myCompany.ActionEnumType" not-null="true" />
<property column="PRIORITY" name="priority"
type="com.myCompany.PriorityEnumType" not-null="true" />
<property column="DATE_MAJ" name="dateMaj" />
</class>
<!-- ============================ -->
<!-- Table TABLE3 -->
<!-- ============================ -->
<class table="TABLE3"
name="com.myCompany.Entity3"
lazy="false" schema="SCHEMA3">
<!-- Attributs -->
<id column="ID" name="id" type="string" />
<property column="ACTION_TYPE" name="actionType"
type="com.myCompany.ActionEnumType" not-null="true" />
<property column="PRIORITY" name="priority"
type="com.myCompany.PriorityEnumType" not-null="true" />
<property column="DATE_MAJ" name="dateMaj" />
</class>
The goal, is to put all the data to be configurable in one external file. The purpose is to define the schema name dynamically because it depends on the deployment environment. Unfortunetely, we can't use in our project neither Maven nor Ant. How or where can i set the different schemas name to resolve this issue?
Thx in advance for you help.