问题:新拉的分支,在保存对象时无法保存父类字段?
相同的代码不同分支,虽然改过一些基础代码,不清楚为什么新的分支出现这个问题
解决办法:父类增加@MappedSuperclass注解
@Data @MappedSuperclass public abstract class BaseEntity { @Basic @Column(name = "create_by") private String createBy; @Basic @Column(name = "create_time") private Timestamp createTime; @Column(name = "update_by") @Basic private String updateBy; @Basic @Column(name = "update_time") private Timestamp updateTime; }
标签:name,jpa,保存,private,Column,Basic,父类 From: https://www.cnblogs.com/dagongjie/p/17578451.html