We have one @MappedSuperclass class Entitythat defines the default identifier and generator:
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Override
public K getId() {
return id;
}
I want to not use the generator at all in the subclass Foo, because I myself provided the primary key.
I have to extend Foofrom a base class Entity, because many, many functions depend on this base class. Annotation @AttributeOverridesdoes not seem to support cancellation @GeneratedValue.
source
share