我有一个简单的 JPA 映射,但我不断收到Could not determine type for
异常。省略了 Setter 和 getter。
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public class SupervisionCommand {
@Id
@GeneratedValue
protected Long id;
}
@Entity
public class MySupervisionCommand extends SupervisionCommand {
}
@Entity
public class Job {
@Id
@GeneratedValue
private Long id;
private SupervisionCommand command;
}
完整的异常消息:Could not determine type for: com.family.model.SupervisionCommand, at table: job, for columns: [org.hibernate.mapping.Column(command)]