Audited with index

Description

I have the following two entities:

@Audited
@Table(
name = "t_parent"
)
@Entity
public class Parent {

@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Child> children;

}

@Audited
@Table(
name = "t_child",
indexes = {
@Index(columnList = "parent_id")
}
)
@Entity
public class Child {

@ManyToOne(optional = false)
@JoinColumn(name = "parent_id")
private Parent parent;

}
When I query the log of a parant of data, it is very slow, because the child's log (more than ten million data) has no index in the table. Could you add annotations like AuditIndexs or Audited#indexes()?

Environment

spring boot 1.5.6
hibernate 5.0.12
spring cloud 1.4.4
querydsl 4.1.4
jdk 8
windows 10

Assignee

Chris Cranford

Reporter

张路权

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Feedback Requested

2019/07/31

Components

Affects versions

Priority

Major
Configure