Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为我的每个实体设置一些字段,如 updateDate、createDate 和 deleteDate,所以我想从包含此属性的 @MappedSuperClass 继承我的实体。
这是一个好习惯吗?
您以何种方式处理此类请求?
谢谢。
是的,这就是我所做的。我有一个“BasicEntity”抽象类,它是我所有实体的超类,具有 id、creationDate、uuid 以及 hashCode 和 equals 等的实现等字段。