@MappedSuperclass
公共抽象类 BaseEntity 实现 org.springframework.security.acls.model.ObjectIdentity {private static final long serialVersionUID = 7620579745392806460L; @Transient private String type; private Long id; @Column(name = "owner_user_id") private Long ownerUserId; @Column(name="id" , unique=true, updatable=false, nullable=false) @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { return this.id; }
}
我的问题是允许我可以在属性上定义@Column 的少数字段和访问或上的少数字段。
第二个问题:有什么方法可以为一组类定义单独的休眠序列。但障碍是 id 字段是在 BaseEntity 类中定义的。
第三个问题:请提供给我很好的教程,在那里我可以找到更多关于性能改进的信息
第四个问题:我们有多个门户在同一个 BD 上运行,具有单个休眠序列。是否可以在实体工厂级别定义休眠序列?
谢谢