I have a base class:
@MappedSuperclass
public abstract class SuperClass{
@Id
protected Long id;
public Long getId() {
return id;
}
}
The @GeneratedValue is not used since the id is generated using a BackendSession
There are a lot of inheritance from this class so one can't change it!
my sub class: I tried to override the getId method
@Entity
@Table(name = "FTC_DATA")
@SequenceGenerator(name="sequence", sequenceName = "FTC_DATA_SEQ")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class SubClass extends SuperClass {
@Override
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "FTC_DATA_SEQ")
public void getId(Long id) {
this.id = id;
}
}
But I fail on IdentifierGenerationException, what am I doing wrong?