首页 > 解决方案 > 具有多个 MappedSuperclass 的 JPA 2.1 和 Hibernate

问题描述

我不知道这是错误还是正常功能,但是在我使用多层次结构后,我的 MappedSuperclass 属性没有被 JPA/hibernate 重新调整。我有这些课程:

  @MappedSuperclass
  public abstract class AbstractDomain{
    private Integer userId;

    @Column
    public Integer getUserId(){
       return userId;
    }

    public void setUserId(Integer userId){
      this.userId=userId;
    }
  }

   public class Invoice extends AbstractDomain{
   }

  @Entity
  public class InvoiceEntity extends Invoice{

  }

那正确吗?

标签: hibernatejpamappedsuperclass

解决方案


推荐阅读