MappedSuperclass – Change SequenceGenerator in Subclass

Yes, it is possible. You can override the default generator name with the @SequenceGenerator annotation. Base class @MappedSuperclass public abstract class PersistentEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = “default_gen”) protected Long id = 0L; public Long getId() { return id; } public void setId(Long id) … Read more