Spring MVC JPA实体事件

gmxoilav  于 2023-11-22  发布在  Spring
关注(0)|答案(1)|浏览(181)
@Entity
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Table(name = "evaluation_form")
@SQLDelete(sql = "UPDATE {h-schema}evaluation_form SET status = 0 WHERE id=? AND version = ?")
@Where(clause="status <> 0")
public class EvaluationForm extends ExPersistableEntity<String> {
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    private String id;
    private String code;
    @Column(columnDefinition = "nvarchar(255)")
    private String name;
    private String biddingCode;
    @Column(columnDefinition = "nvarchar(255)")
    private String biddingName;
    private String biddingType;
    private String biddingMethod;
    private String state;
    private String biddingForm;

字符串
我想问一下有没有什么方法可以保存表格的添加、编辑和删除操作请帮助我

rseugnpd

rseugnpd1#

我们可以使用AuditTrailList类记录实体中的所有活动。
你可以在这里找到JPA Entity Lifecycle Events和这里Auditing with JPA, Hibernate, and Spring Data JPA

相关问题