title: Override JPA only Table Generator of Entity with orm.xml (Hibernate)
body: <p>I have a JPA entity as follows:</p>
  
  <pre><code>public class Host {
      @Id
      @TableGenerator(name = "Host.id", schema = "Schema", table = "SEQUENCE", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "Host.id")
      @GeneratedValue(generator = "Host.id", strategy = GenerationType.TABLE)
      protected Long id;
  
      @NotNull
      @Column(length = 64, nullable = false)
      protected String name;
  
      @Size(max = 64)
      @Column(length = 64)
      protected String hardwareType;
  
      @Size(max = 65535)
      @Column(length = 65535)
      protected String resourceDescription;
  }
  </code></pre>
  
  <p>How can I override the Table Generator (without using the Hibernate specific <code>@GenericGenerator</code> annotation)?</p>
  
  <p>Currently, I have a solution that defines a <code>&lt;hibernate-mapping&gt;</code> for the entity in a <code>orm.xml</code> file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC
          "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
          "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"&gt;
  
  &lt;hibernate-mapping&gt;
      &lt;class name="com.x.y.datamodel.config.equipment.Host" schema="Schema"&gt;
          &lt;id name="id" column="id"&gt;
              &lt;generator class="com.x.y.customtablegenerator.CustomTableGenerator"/&gt;
          &lt;/id&gt;
          &lt;property name="name" column="name"&gt;&lt;/property&gt;
          &lt;property name="hardwareType" column="hardwareType"&gt;&lt;/property&gt;
          ...
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>However, this requires me to add a <code>&lt;property&gt;</code> for every property defined in the Entity.</p>
  
  <p><strong>Is there a way to override <em>only</em> the Generator without having to specify all the properties of the entity twice?</strong></p>