title: MappedSuperclass - Change SequenceGenerator in Subclass
body: <p>I'm using JPA2 with Hibernate and try to introduce a common base class for my entities. So far it looks like that:</p>
  
  <pre><code>@MappedSuperclass
  public abstract class BaseEntity {
  
      @Id
      private Long id;
  
      @Override
      public int hashCode() {
          // ...
      }
  
      @Override
      public boolean equals(Object obj) {
          // ...
      }
  
      public Long getId() {
          return this.id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  }
  </code></pre>
  
  <p>However, for every table theres a sequence <code>$entityname_seq</code> which I want to use as my sequence generator. How can I set that from my subclass? I think I need to override @GeneratedValue and create a new SequenceGenerator with @SequenceGenerator.</p>