title: Hibernate use same mapping for multiple tables
body: <p>I have 2 identical DB instances containing FOO_TABLE with the same schema. So, currently I have one class definition per DB instance:</p>
  
  <pre><code>&lt;class name="FooTable" table="FOO_TABLE" entity-name="FooTableInstance1"&gt;
    &lt;property name="..." column="..." /&gt;
    &lt;property name="..." column="..." /&gt;
    ....
  &lt;/class&gt;
  
  &lt;class name="FooTable" table="FOO_TABLE" entity-name="FooTableInstance2"&gt;
    &lt;property name="..." column="..." /&gt;
    &lt;property name="..." column="..." /&gt;
    ....
  &lt;/class&gt;
  </code></pre>
  
  <p>The problem is that I don't want to copy-paste the properties, as the tables have the same schema. Is it possible to inherit the 2 classes from a base class which contains all the mappings and in the 2 children classes specify different entity-name?</p>