java hibernate-具有InheritanceType.JOINED的重复列

java hibernate-具有InheritanceType.JOINED的重复列,java,hibernate,joined-subclass,Java,Hibernate,Joined Subclass,我想用InheritanceType.JOINED将超类和子类存储在数据库中。但每次我尝试这样做时,我都会在实体:com.inqool.personalpro.entity.QuestionAlgorithm column:id的映射中得到一个错误-重复的列(应该用insert=“false”update=“false”映射) 以下是我的实体: @Entity @Inheritance(strategy=InheritanceType.JOINED) public class Question

我想用InheritanceType.JOINED将超类和子类存储在数据库中。但每次我尝试这样做时,我都会在实体:com.inqool.personalpro.entity.QuestionAlgorithm column:id的映射中得到一个错误-
重复的列(应该用insert=“false”update=“false”映射)
以下是我的实体:

@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public class Question implements Serializable {

    private Long id;

    @Id
    @GeneratedValue
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    ...
}

@Entity
@PrimaryKeyJoinColumn(name="id")
public class QuestionAlgorithm extends Question {

    private Long id;

    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    ...
}
当我从子类中删除字段“id”时,会出现以下错误:
无法找到拥有按映射顺序引用的列[id]的表


有什么想法吗?谢谢。

问题出在hibernate版本中。在4.1.7中,这是被窃听的。我将版本更改为4.1.4,一切正常