【发布时间】:2017-03-07 11:39:21
【问题描述】:
我的模型中有 oneToMany 和 ManyToOne 映射:
类学院
@OneToMany(fetch = FetchType.EAGER)
@JoinTable(name = "collegecource", joinColumns = @JoinColumn(name = "college", referencedColumnName = "college"), inverseJoinColumns = @JoinColumn(name = "cource", referencedColumnName = "cource"))
private Set<course> course;
在一个能够关联的表中,我有一个额外的列 isActive
我想用 create/update/delete 审计所有表。
我在大学课程中添加了@Audited
@Audited
public class collegecource
当我尝试使用关系数据创建/更新父级时,审核工作正常。 但是当我尝试删除关系数据(子数据)时,它不是在审核。
你能帮帮我吗。
【问题讨论】:
-
你有@Audited in Cource 吗?
-
所以您的问题是当您从
college中删除collegecource时,collegecource和college都不会发生审计操作?我假设college也被注释为@Audited?
标签: java spring hibernate jpa hibernate-envers