Yes, perhaps, although this attitude will be read-only:
@Entity @Inheritence(...)
@DiscriminatorColumn(name = "DEPT_TYPE_ID")
public class Department {
...
@ManyToOne
@JoinColumn(name = "DEPT_TYPE_ID", insertable = false, updatable = false)
private DepartmentType deptType;
...
}
source
share