Software Development, Linux, and Windows
Notes on Software Development, Linux, and Windows
JPA: How to use a base class for your entities
In order for to extend a base class from you entities, you must use the annotation @MappedSuperclass on the base class:
@MappedSuperclass
public abstract class AbstractBaseEntity
Then in your entity class extend the class as you usually would:
@Entity
public class MyConcreteEntity extends AbstractBaseEntity