2 Replies Latest reply on Jul 27, 2006 5:56 AM by Derek Chen-Becker

    Overriding the generated value inherited from a mapped super

    Derek Chen-Becker Newbie

      If I have a class:

      @SequenceGenerator(name = "log_id_seq", sequenceName = "log_id_seq")
      public class LogEntry implements Serializable {
       private static final long serialVersionUID = 1L;
       protected Long id;
       protected Date timestamp;
       protected Actor actor;
       protected String location;
       protected String summary;
       @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "log_id_seq")
       public Long getId() {
       return id;
       // The rest of the getters/setters...

      Can I override the generated value generator in subclasses somehow? I'd like to have a separate sequence for each subclass if possible.